Loading quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +4 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import java.io.PrintWriter; import java.util.Arrays; Loading Loading @@ -210,6 +211,9 @@ public class LauncherTaskbarUIController extends TaskbarUIController { */ @Override public void onLauncherVisibilityChanged(boolean isVisible) { if (DesktopModeStatus.enterDesktopByDefaultOnFreeformDisplay(mLauncher)) { DisplayController.handleInfoChangeForLauncherVisibilityChanged(mLauncher); } onLauncherVisibilityChanged(isVisible, false /* fromInit */); } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt +5 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,11 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas defaultTouchableRegion.addBoundsToRegion(bubbleBarViewController.bubbleBarBounds) } } if (taskbarStashController.isInApp || taskbarStashController.isInOverview) { if ( taskbarStashController.isInApp || taskbarStashController.isInOverview || DisplayController.showLockedTaskbarOnHome(context) ) { // only add the taskbar touch region if not on home val bottom = windowLayoutParams.height val top = bottom - taskbarTouchableHeight Loading quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +5 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } Loading @@ -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; Loading quickstep/src/com/android/quickstep/util/SystemWindowManagerProxy.java +21 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.quickstep.util; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.view.Display.DEFAULT_DISPLAY; import android.content.Context; Loading @@ -30,6 +31,8 @@ import com.android.launcher3.statehandlers.DesktopVisibilityController; import com.android.launcher3.util.WindowBounds; import com.android.launcher3.util.window.CachedDisplayInfo; import com.android.launcher3.util.window.WindowManagerProxy; import com.android.quickstep.SystemUiProxy; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import java.util.List; import java.util.Set; Loading Loading @@ -65,6 +68,24 @@ public class SystemWindowManagerProxy extends WindowManagerProxy { return desktopController != null && desktopController.areDesktopTasksVisible(); } @Override public boolean showLockedTaskbarOnHome(Context displayInfoContext) { if (!DesktopModeStatus.canEnterDesktopMode(displayInfoContext)) { return false; } if (!DesktopModeStatus.enterDesktopByDefaultOnFreeformDisplay(displayInfoContext)) { return false; } final boolean isFreeformDisplay = displayInfoContext.getResources().getConfiguration() .windowConfiguration.getWindowingMode() == WINDOWING_MODE_FREEFORM; return isFreeformDisplay; } @Override public boolean isHomeVisible(Context context) { return SystemUiProxy.INSTANCE.get(context).getHomeVisibilityState().isHomeVisible(); } @Override public int getRotation(Context displayInfoContext) { return displayInfoContext.getResources().getConfiguration().windowConfiguration Loading src/com/android/launcher3/util/DisplayController.java +32 −1 Original line number Diff line number Diff line Loading @@ -194,6 +194,13 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { INSTANCE.get(context).handleInfoChange(context.getDisplay()); } /** * Handles info change for launcher visibility. */ public static void handleInfoChangeForLauncherVisibilityChanged(Context context) { INSTANCE.get(context).handleInfoChange(context.getDisplay()); } /** * Enables transient taskbar status for tests. */ Loading @@ -217,6 +224,13 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { return INSTANCE.get(context).getInfo().isPinnedTaskbar(); } /** * Returns whether the taskbar is forced to be pinned when home is visible. */ public static boolean showLockedTaskbarOnHome(Context context) { return INSTANCE.get(context).getInfo().showLockedTaskbarOnHome(); } @Override public void close() { mDestroyed = true; Loading Loading @@ -345,7 +359,8 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { } if ((newInfo.mIsTaskbarPinned != oldInfo.mIsTaskbarPinned) || (newInfo.mIsTaskbarPinnedInDesktopMode != oldInfo.mIsTaskbarPinnedInDesktopMode)) { != oldInfo.mIsTaskbarPinnedInDesktopMode) || newInfo.isPinnedTaskbar() != oldInfo.isPinnedTaskbar()) { change |= CHANGE_TASKBAR_PINNING; } if (newInfo.mIsInDesktopMode != oldInfo.mIsInDesktopMode) { Loading Loading @@ -399,6 +414,9 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { private final boolean mIsInDesktopMode; private final boolean mShowLockedTaskbarOnHome; private final boolean mIsHomeVisible; public Info(Context displayInfoContext) { /* don't need system overrides for external displays */ this(displayInfoContext, new WindowManagerProxy(), new ArrayMap<>()); Loading Loading @@ -460,6 +478,8 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { mIsTaskbarPinnedInDesktopMode = LauncherPrefs.get(displayInfoContext).get( TASKBAR_PINNING_IN_DESKTOP_MODE); mIsInDesktopMode = wmProxy.isInDesktopMode(); mShowLockedTaskbarOnHome = wmProxy.showLockedTaskbarOnHome(displayInfoContext); mIsHomeVisible = wmProxy.isHomeVisible(displayInfoContext); } /** Loading @@ -476,6 +496,10 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { return sTransientTaskbarStatusForTests; } if (enableTaskbarPinning()) { // If Launcher is visible on the freeform display, ensure the taskbar is pinned. if (mShowLockedTaskbarOnHome && mIsHomeVisible) { return false; } if (mIsInDesktopMode) { return !mIsTaskbarPinnedInDesktopMode; } Loading Loading @@ -543,6 +567,13 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { return TYPE_PHONE; } } /** * Returns whether the taskbar is forced to be pinned when home is visible. */ public boolean showLockedTaskbarOnHome() { return mShowLockedTaskbarOnHome; } } /** Loading Loading
quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +4 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import java.io.PrintWriter; import java.util.Arrays; Loading Loading @@ -210,6 +211,9 @@ public class LauncherTaskbarUIController extends TaskbarUIController { */ @Override public void onLauncherVisibilityChanged(boolean isVisible) { if (DesktopModeStatus.enterDesktopByDefaultOnFreeformDisplay(mLauncher)) { DisplayController.handleInfoChangeForLauncherVisibilityChanged(mLauncher); } onLauncherVisibilityChanged(isVisible, false /* fromInit */); } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt +5 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,11 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas defaultTouchableRegion.addBoundsToRegion(bubbleBarViewController.bubbleBarBounds) } } if (taskbarStashController.isInApp || taskbarStashController.isInOverview) { if ( taskbarStashController.isInApp || taskbarStashController.isInOverview || DisplayController.showLockedTaskbarOnHome(context) ) { // only add the taskbar touch region if not on home val bottom = windowLayoutParams.height val top = bottom - taskbarTouchableHeight Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +5 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); } Loading @@ -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; Loading
quickstep/src/com/android/quickstep/util/SystemWindowManagerProxy.java +21 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.quickstep.util; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.view.Display.DEFAULT_DISPLAY; import android.content.Context; Loading @@ -30,6 +31,8 @@ import com.android.launcher3.statehandlers.DesktopVisibilityController; import com.android.launcher3.util.WindowBounds; import com.android.launcher3.util.window.CachedDisplayInfo; import com.android.launcher3.util.window.WindowManagerProxy; import com.android.quickstep.SystemUiProxy; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import java.util.List; import java.util.Set; Loading Loading @@ -65,6 +68,24 @@ public class SystemWindowManagerProxy extends WindowManagerProxy { return desktopController != null && desktopController.areDesktopTasksVisible(); } @Override public boolean showLockedTaskbarOnHome(Context displayInfoContext) { if (!DesktopModeStatus.canEnterDesktopMode(displayInfoContext)) { return false; } if (!DesktopModeStatus.enterDesktopByDefaultOnFreeformDisplay(displayInfoContext)) { return false; } final boolean isFreeformDisplay = displayInfoContext.getResources().getConfiguration() .windowConfiguration.getWindowingMode() == WINDOWING_MODE_FREEFORM; return isFreeformDisplay; } @Override public boolean isHomeVisible(Context context) { return SystemUiProxy.INSTANCE.get(context).getHomeVisibilityState().isHomeVisible(); } @Override public int getRotation(Context displayInfoContext) { return displayInfoContext.getResources().getConfiguration().windowConfiguration Loading
src/com/android/launcher3/util/DisplayController.java +32 −1 Original line number Diff line number Diff line Loading @@ -194,6 +194,13 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { INSTANCE.get(context).handleInfoChange(context.getDisplay()); } /** * Handles info change for launcher visibility. */ public static void handleInfoChangeForLauncherVisibilityChanged(Context context) { INSTANCE.get(context).handleInfoChange(context.getDisplay()); } /** * Enables transient taskbar status for tests. */ Loading @@ -217,6 +224,13 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { return INSTANCE.get(context).getInfo().isPinnedTaskbar(); } /** * Returns whether the taskbar is forced to be pinned when home is visible. */ public static boolean showLockedTaskbarOnHome(Context context) { return INSTANCE.get(context).getInfo().showLockedTaskbarOnHome(); } @Override public void close() { mDestroyed = true; Loading Loading @@ -345,7 +359,8 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { } if ((newInfo.mIsTaskbarPinned != oldInfo.mIsTaskbarPinned) || (newInfo.mIsTaskbarPinnedInDesktopMode != oldInfo.mIsTaskbarPinnedInDesktopMode)) { != oldInfo.mIsTaskbarPinnedInDesktopMode) || newInfo.isPinnedTaskbar() != oldInfo.isPinnedTaskbar()) { change |= CHANGE_TASKBAR_PINNING; } if (newInfo.mIsInDesktopMode != oldInfo.mIsInDesktopMode) { Loading Loading @@ -399,6 +414,9 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { private final boolean mIsInDesktopMode; private final boolean mShowLockedTaskbarOnHome; private final boolean mIsHomeVisible; public Info(Context displayInfoContext) { /* don't need system overrides for external displays */ this(displayInfoContext, new WindowManagerProxy(), new ArrayMap<>()); Loading Loading @@ -460,6 +478,8 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { mIsTaskbarPinnedInDesktopMode = LauncherPrefs.get(displayInfoContext).get( TASKBAR_PINNING_IN_DESKTOP_MODE); mIsInDesktopMode = wmProxy.isInDesktopMode(); mShowLockedTaskbarOnHome = wmProxy.showLockedTaskbarOnHome(displayInfoContext); mIsHomeVisible = wmProxy.isHomeVisible(displayInfoContext); } /** Loading @@ -476,6 +496,10 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { return sTransientTaskbarStatusForTests; } if (enableTaskbarPinning()) { // If Launcher is visible on the freeform display, ensure the taskbar is pinned. if (mShowLockedTaskbarOnHome && mIsHomeVisible) { return false; } if (mIsInDesktopMode) { return !mIsTaskbarPinnedInDesktopMode; } Loading Loading @@ -543,6 +567,13 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { return TYPE_PHONE; } } /** * Returns whether the taskbar is forced to be pinned when home is visible. */ public boolean showLockedTaskbarOnHome() { return mShowLockedTaskbarOnHome; } } /** Loading