Initialize mRotationTouchHelper before onInputDeviceAdded

There is dependency there that can cause npe from mRotationTouchHelper not initialized yet

Fixes: 345893434
Test: N/A
Change-Id: Ib9009f23d71eccf6b554e21c51ba640304250af0
This commit is contained in:
Tracy Zhou committed 2024-06-11 13:06:03 -07:00
1 parent 38b9e1438e
commit 70041c88ad
1 file changed
+1 -1
@@ -578,6 +578,7 @@ public class TouchInteractionService extends Service {
mMainChoreographer = Choreographer.getInstance();
mAM = ActivityManagerWrapper.getInstance();
mDeviceState = new RecentsAnimationDeviceState(this, true);
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mAllAppsActionManager = new AllAppsActionManager(
this, UI_HELPER_EXECUTOR, this::createAllAppsPendingIntent);
mInputManager = getSystemService(InputManager.class);
@@ -590,7 +591,6 @@ public class TouchInteractionService extends Service {
}
}
mTaskbarManager = new TaskbarManager(this, mAllAppsActionManager, mNavCallbacks);
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer();
// Call runOnUserUnlocked() before any other callbacks to ensure everything is initialized.