Call onUserUnlocked() before adding callbacks am: 5a36b919b5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15756866

Change-Id: I03e5411032285015489f4b8bceb8b023e9c12909
This commit is contained in:
Tony Wickham 2021-09-04 03:13:40 +00:00 committed by Automerger Merge Worker
commit 79ff586c10
1 changed files with 5 additions and 3 deletions

View File

@ -358,12 +358,14 @@ public class TouchInteractionService extends Service implements PluginListener<O
mDeviceState = new RecentsAnimationDeviceState(this, true);
mDisplayManager = getSystemService(DisplayManager.class);
mTaskbarManager = new TaskbarManager(this);
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);
// Call runOnUserUnlocked() before any other callbacks to ensure everything is initialized.
mDeviceState.runOnUserUnlocked(this::onUserUnlocked);
mDeviceState.runOnUserUnlocked(mTaskbarManager::onUserUnlocked);
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);
ProtoTracer.INSTANCE.get(this).add(this);
LauncherSplitScreenListener.INSTANCE.get(this).init();
sConnected = true;