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

Commit 8acdb23e authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Init rotationTouchHelper before NavModeChange listener

NavModeChange listener relies on rotationTouchHelper
to be non-null, but we instantiate rotationTouchHelper
after nav mode changes are fired off.

Fixes: 166303464
Change-Id: Iab92d0fe0ee842d907d7226dfd9ca599e7729675
parent a2d6a91b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -249,10 +249,10 @@ public class TouchInteractionService extends Service implements PluginListener<O
        mMainChoreographer = Choreographer.getInstance();
        mAM = ActivityManagerWrapper.getInstance();
        mDeviceState = new RecentsAnimationDeviceState(this);
        mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
        mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
        mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);
        mDeviceState.runOnUserUnlocked(this::onUserUnlocked);
        mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
        ProtoTracer.INSTANCE.get(this).add(this);

        sConnected = true;