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

Commit d9d17ce1 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Init nav mode in TaskbarActivityContext between fold/unfold

In RotationButtonController, we show the floating rotation button either when the bar is visible, or when the device is in gesture nav mode, even in an immersive app. The issue here is that mNavMode is not correctly initialized after the device is unfolded.

Fixes: 272164624
Test: Open townhall. Fold and then unfold. Tilt the device and make sure the floating rotation button shows.
Change-Id: I09025132fdca5c764e66d9ac21f29b853741d257
parent 31689cad
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -306,6 +306,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext {

        // Initialize controllers after all are constructed.
        mControllers.init(sharedState);
        // This may not be necessary and can be reverted once we move towards recreating all
        // controllers without re-creating the window
        mControllers.rotationButtonController.onNavigationModeChanged(mNavMode.resValue);
        updateSysuiStateFlags(sharedState.sysuiStateFlags, true /* fromInit */);
        disableNavBarElements(sharedState.disableNavBarDisplayId, sharedState.disableNavBarState1,
                sharedState.disableNavBarState2, false /* animate */);