[WARN] W/System.err: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
[WARN] W/System.err: at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6816)
[WARN] W/System.err: at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:975)
[WARN] W/System.err: at android.view.ViewGroup.invalidateChild(ViewGroup.java:5125)
[WARN] W/System.err: at android.view.View.invalidateInternal(View.java:12774)
[WARN] W/System.err: at android.view.View.invalidate(View.java:12738)
[WARN] W/System.err: at android.view.View.invalidate(View.java:12722)
[WARN] W/System.err: at android.widget.ImageView.invalidateDrawable(ImageView.java:246)
[WARN] W/System.err: at android.graphics.drawable.Drawable.invalidateSelf(Drawable.java:385)
[WARN] W/System.err: at android.graphics.drawable.Drawable.setVisible(Drawable.java:764)
[WARN] W/System.err: at android.widget.ImageView.onDetachedFromWindow(ImageView.java:1515)
[WARN] W/System.err: at android.view.View.dispatchDetachedFromWindow(View.java:14616)
[WARN] W/System.err: at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4647)
[WARN] W/System.err: at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4620)
[WARN] W/System.err: at android.view.ViewGroup.removeView(ViewGroup.java:4551)
[WARN] W/System.err: at android.support.v7.widget.Toolbar.setNavigationIcon(Toolbar.java:962)
[WARN] W/System.err: at android.support.v7.widget.ToolbarWidgetWrapper.updateNavigationIcon(ToolbarWidgetWrapper.java:613)
[WARN] W/System.err: at android.support.v7.widget.ToolbarWidgetWrapper.setDisplayOptions(ToolbarWidgetWrapper.java:392)
[WARN] W/System.err: at android.support.v7.app.ToolbarActionBar.setDisplayOptions(ToolbarActionBar.java:260)
[WARN] W/System.err: at android.support.v7.app.ToolbarActionBar.setDisplayOptions(ToolbarActionBar.java:254)
[WARN] W/System.err: at org.appcelerator.titanium.proxy.ActionBarProxy.<init>(ActionBarProxy.java:58)
[WARN] W/System.err: at org.appcelerator.titanium.proxy.ActivityProxy.getActionBar(ActivityProxy.java:258)
[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)
[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43)
[WARN] W/System.err: at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:147)
[WARN] W/System.err: at android.os.Handler.handleCallback(Handler.java:739)
[WARN] W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN] W/System.err: at android.os.Looper.loop(Looper.java:148)
[WARN] W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118)
Patch with fix is in attachment.
Hello [~s.volkov], Thanks for the ticket. Our engineering will look into it.
https://github.com/appcelerator/titanium_mobile/pull/10176
*Closing ticket.* Verified fix in SDK version
7.5.0.v20180925002114
.getActionBar()
no longer throws "CalledFromWrongThreadException" exception. *Test Environment*