SystemUI: Set brightness slider view restriction from the right thread
The brightness slider view can only be safely touched from the main handler, not the background handler. This fixes the following crash: E AndroidRuntime: FATAL EXCEPTION: SysUiBg E AndroidRuntime: Process: com.android.systemui, PID: 4217 E AndroidRuntime: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. E AndroidRuntime: at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:8804) E AndroidRuntime: at android.view.ViewRootImpl.focusableViewAvailable(ViewRootImpl.java:4612) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:962) E AndroidRuntime: at android.view.View.setFlags(View.java:16122) E AndroidRuntime: at android.view.View.setEnabled(View.java:11744) E AndroidRuntime: at com.android.systemui.settings.ToggleSliderView.setEnforcedAdmin(ToggleSliderView.java:101) E AndroidRuntime: at com.android.systemui.settings.BrightnessController$10.run(BrightnessController.java:432) E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938) E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) E AndroidRuntime: at android.os.Looper.loop(Looper.java:223) E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:67) Change-Id: Iac48d0b652f148411c5d7a48b19d7ba0c9c24fca
Loading
Please register or sign in to comment