Allow to show pinned taskbar when Launcher is visible
This CL allows freeform-first devices to lock the taskbar in a pinned state when Launcher is visible. Bug: 361419732 Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays Test: DisplayControllerTest Test: manual Change-Id: Ic0d2740e33fee19c676d88aa2bcf370eb64366e8
This commit is contained in:
@@ -53,6 +53,7 @@ import com.android.launcher3.anim.AnimatorListeners;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.statemanager.StateManager;
|
||||
import com.android.launcher3.uioverrides.QuickstepLauncher;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
|
||||
import com.android.quickstep.RecentsAnimationCallbacks;
|
||||
import com.android.quickstep.RecentsAnimationController;
|
||||
@@ -662,6 +663,9 @@ public class TaskbarLauncherStateController {
|
||||
* This refers to the intended state - a transition to this state might be in progress.
|
||||
*/
|
||||
public boolean isTaskbarAlignedWithHotseat() {
|
||||
if (DisplayController.showLockedTaskbarOnHome(mLauncher) && isInLauncher()) {
|
||||
return false;
|
||||
}
|
||||
return mLauncherState.isTaskbarAlignedWithHotseat(mLauncher);
|
||||
}
|
||||
|
||||
@@ -673,8 +677,7 @@ public class TaskbarLauncherStateController {
|
||||
boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher);
|
||||
boolean willStashVisually = isInStashedState
|
||||
&& mControllers.taskbarStashController.supportsVisualStashing();
|
||||
boolean isTaskbarAlignedWithHotseat =
|
||||
mLauncherState.isTaskbarAlignedWithHotseat(mLauncher);
|
||||
boolean isTaskbarAlignedWithHotseat = isTaskbarAlignedWithHotseat();
|
||||
return isTaskbarAlignedWithHotseat && !willStashVisually;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user