mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 09:38:19 +00:00
Call onUserUnlocked() before adding callbacks
This gives us a chance to initialize things in onUserUnlocked() if we're already unlocked, before doing any other logic that might use those variables. Test: None (unable to reproduce) Fixes: 184773649 Change-Id: I72ed91ae6202ec816f9bdceb4d9fd03b9a002816
This commit is contained in:
@@ -331,12 +331,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);
|
||||
sConnected = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user