mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Initiate taskbar only after the user is unlocked
Bug: 188755902 Test: Presubmit Change-Id: Ida4bc07f45396e82ab404a617aa6833afeea78bc
This commit is contained in:
@@ -57,6 +57,8 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
private static final int CHANGE_FLAGS =
|
||||
CHANGE_ACTIVE_SCREEN | CHANGE_DENSITY | CHANGE_SUPPORTED_BOUNDS;
|
||||
|
||||
private boolean mUserUnlocked = false;
|
||||
|
||||
public TaskbarManager(TouchInteractionService service) {
|
||||
mDisplayController = DisplayController.INSTANCE.get(service);
|
||||
mSysUINavigationMode = SysUINavigationMode.INSTANCE.get(service);
|
||||
@@ -89,6 +91,14 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the user is unlocked
|
||||
*/
|
||||
public void onUserUnlocked() {
|
||||
mUserUnlocked = true;
|
||||
recreateTaskbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets or clears a launcher to act as taskbar callback
|
||||
*/
|
||||
@@ -106,6 +116,9 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
if (!FeatureFlags.ENABLE_TASKBAR.get()) {
|
||||
return;
|
||||
}
|
||||
if (!mUserUnlocked) {
|
||||
return;
|
||||
}
|
||||
DeviceProfile dp = LauncherAppState.getIDP(mContext).getDeviceProfile(mContext);
|
||||
if (!dp.isTaskbarPresent) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user