Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b3598f1 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Provide bgExecutor for RotationButtonController

Bug: 289341065
Test: Unfolded, checked perfetto trace, it
shows up not on UI thread

Change-Id: I9a080c9a5c3c57f38eb6719ed73952dde4f6bba1
parent 997bc3e3
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -226,20 +226,23 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
        }

        // Construct controllers.
        mControllers = new TaskbarControllers(this,
                new TaskbarDragController(this),
                buttonController,
                isDesktopMode
                        ? new DesktopNavbarButtonsViewController(this, navButtonsView)
                        : new NavbarButtonsViewController(this, navButtonsView),
                new RotationButtonController(this,
        RotationButtonController rotationButtonController = new RotationButtonController(this,
                c.getColor(R.color.floating_rotation_button_light_color),
                c.getColor(R.color.floating_rotation_button_dark_color),
                R.drawable.ic_sysbar_rotate_button_ccw_start_0,
                R.drawable.ic_sysbar_rotate_button_ccw_start_90,
                R.drawable.ic_sysbar_rotate_button_cw_start_0,
                R.drawable.ic_sysbar_rotate_button_cw_start_90,
                        () -> getDisplay().getRotation()),
                () -> getDisplay().getRotation());
        rotationButtonController.setBgExecutor(Executors.THREAD_POOL_EXECUTOR);

        mControllers = new TaskbarControllers(this,
                new TaskbarDragController(this),
                buttonController,
                isDesktopMode
                        ? new DesktopNavbarButtonsViewController(this, navButtonsView)
                        : new NavbarButtonsViewController(this, navButtonsView),
                rotationButtonController,
                new TaskbarDragLayerController(this, mDragLayer),
                new TaskbarViewController(this, taskbarView),
                new TaskbarScrimViewController(this, taskbarScrimView),