mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Notify System UI about taskbar state
We want to move the rotation suggestion button to the middle of the taskbar when it is visible and not stashed. To do this we need to update System UI about the current state of the taskbar. Test: manual Fixes: 187410455 Change-Id: Id918e10a44631362f7c3a8a8bb624ee80bdd3c8b
This commit is contained in:
@@ -36,6 +36,7 @@ import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.DisplayController.Info;
|
||||
import com.android.quickstep.SysUINavigationMode;
|
||||
import com.android.quickstep.SysUINavigationMode.Mode;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
import com.android.quickstep.TouchInteractionService;
|
||||
|
||||
/**
|
||||
@@ -127,16 +128,19 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
|
||||
private void recreateTaskbar() {
|
||||
destroyExistingTaskbar();
|
||||
if (!FeatureFlags.ENABLE_TASKBAR.get()) {
|
||||
return;
|
||||
}
|
||||
if (!mUserUnlocked) {
|
||||
return;
|
||||
}
|
||||
DeviceProfile dp = LauncherAppState.getIDP(mContext).getDeviceProfile(mContext);
|
||||
if (!dp.isTaskbarPresent) {
|
||||
|
||||
DeviceProfile dp =
|
||||
mUserUnlocked ? LauncherAppState.getIDP(mContext).getDeviceProfile(mContext) : null;
|
||||
|
||||
boolean isTaskBarEnabled =
|
||||
FeatureFlags.ENABLE_TASKBAR.get() && dp != null && dp.isTaskbarPresent;
|
||||
|
||||
if (!isTaskBarEnabled) {
|
||||
SystemUiProxy.INSTANCE.get(mContext)
|
||||
.notifyTaskbarStatus(/* visible */ false, /* stashed */ false);
|
||||
return;
|
||||
}
|
||||
|
||||
mTaskbarActivityContext = new TaskbarActivityContext(
|
||||
mContext, dp.copy(mContext), mNavButtonController);
|
||||
mTaskbarActivityContext.init();
|
||||
|
||||
Reference in New Issue
Block a user