Loading quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java +37 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import static android.view.View.VISIBLE; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.window.flags.Flags.enableDesktopWindowingWallpaperActivity; import android.os.Debug; import android.os.SystemProperties; Loading Loading @@ -141,7 +142,8 @@ public class DesktopVisibilityController { final boolean isVisible = visibleTasksCount > 0; mVisibleDesktopTasksCount = visibleTasksCount; if (wasVisible != isVisible) { if (!enableDesktopWindowingWallpaperActivity() && wasVisible != isVisible) { // TODO: b/333533253 - Remove after flag rollout if (mVisibleDesktopTasksCount > 0) { setLauncherViewsVisibility(View.INVISIBLE); if (!mInOverviewState) { Loading Loading @@ -178,6 +180,10 @@ public class DesktopVisibilityController { } if (overviewStateEnabled != mInOverviewState) { mInOverviewState = overviewStateEnabled; if (enableDesktopWindowingWallpaperActivity()) { return; } // TODO: b/333533253 - Clean up after flag rollout if (mInOverviewState) { setLauncherViewsVisibility(View.VISIBLE); markLauncherResumed(); Loading @@ -190,6 +196,9 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void setBackgroundStateEnabled(boolean backgroundStateEnabled) { if (DEBUG) { Log.d(TAG, "setBackgroundStateEnabled: enabled=" + backgroundStateEnabled Loading @@ -210,6 +219,8 @@ public class DesktopVisibilityController { /** * Whether recents gesture is currently in progress. * * TODO: b/333533253 - Remove after flag rollout */ public boolean isRecentsGestureInProgress() { return mGestureInProgress; Loading @@ -217,6 +228,8 @@ public class DesktopVisibilityController { /** * Notify controller that recents gesture has started. * * TODO: b/333533253 - Remove after flag rollout */ public void setRecentsGestureStart() { if (DEBUG) { Loading @@ -228,6 +241,8 @@ public class DesktopVisibilityController { /** * Notify controller that recents gesture finished with the given * {@link com.android.quickstep.GestureState.GestureEndTarget} * * TODO: b/333533253 - Remove after flag rollout */ public void setRecentsGestureEnd(@Nullable GestureState.GestureEndTarget endTarget) { if (DEBUG) { Loading @@ -241,6 +256,9 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void setRecentsGestureInProgress(boolean gestureInProgress) { if (gestureInProgress != mGestureInProgress) { mGestureInProgress = gestureInProgress; Loading @@ -256,7 +274,13 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void setLauncherViewsVisibility(int visibility) { if (enableDesktopWindowingWallpaperActivity()) { return; } if (DEBUG) { Log.d(TAG, "setLauncherViewsVisibility: visibility=" + visibility + " " + Debug.getCaller()); Loading @@ -275,7 +299,13 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void markLauncherPaused() { if (enableDesktopWindowingWallpaperActivity()) { return; } if (DEBUG) { Log.d(TAG, "markLauncherPaused " + Debug.getCaller()); } Loading @@ -286,7 +316,13 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void markLauncherResumed() { if (enableDesktopWindowingWallpaperActivity()) { return; } if (DEBUG) { Log.d(TAG, "markLauncherResumed " + Debug.getCaller()); } Loading quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +5 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.android.launcher3.statemanager.BaseState.FLAG_NON_INTERACTIVE; import static com.android.launcher3.taskbar.TaskbarEduTooltipControllerKt.TOOLTIP_STEP_FEATURES; import static com.android.launcher3.taskbar.TaskbarLauncherStateController.FLAG_VISIBLE; import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS; import static com.android.window.flags.Flags.enableDesktopWindowingWallpaperActivity; import android.animation.Animator; import android.animation.AnimatorSet; Loading Loading @@ -218,9 +219,10 @@ public class LauncherTaskbarUIController extends TaskbarUIController { DesktopVisibilityController desktopController = LauncherActivityInterface.INSTANCE.getDesktopVisibilityController(); final boolean onDesktop = desktopController != null && desktopController.areDesktopTasksVisible(); if (onDesktop) { if (!enableDesktopWindowingWallpaperActivity() && desktopController != null && desktopController.areDesktopTasksVisible()) { // TODO: b/333533253 - Remove after flag rollout isVisible = false; } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +1 −0 Original line number Diff line number Diff line Loading @@ -837,6 +837,7 @@ public class TaskbarLauncherStateController { appendFlag(result, flags, FLAG_LAUNCHER_WAS_ACTIVE_WHILE_AWAKE, "was_active_while_awake"); appendFlag(result, flags, FLAG_DEVICE_LOCKED, "device_locked"); appendFlag(result, flags, FLAG_TASKBAR_HIDDEN, "taskbar_hidden"); return result.toString(); } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +1 −0 Original line number Diff line number Diff line Loading @@ -1165,6 +1165,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba appendFlag(sj, flags, FLAG_STASHED_IN_APP_AUTO, "FLAG_STASHED_IN_APP_AUTO"); appendFlag(sj, flags, FLAG_STASHED_SYSUI, "FLAG_STASHED_SYSUI"); appendFlag(sj, flags, FLAG_STASHED_DEVICE_LOCKED, "FLAG_STASHED_DEVICE_LOCKED"); appendFlag(sj, flags, FLAG_IN_OVERVIEW, "FLAG_IN_OVERVIEW"); return sj.toString(); } Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +4 −3 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import static com.android.quickstep.util.AnimUtils.completeRunnableListCallback; import static com.android.quickstep.util.SplitAnimationTimings.TABLET_HOME_TO_SPLIT; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY; import static com.android.window.flags.Flags.enableDesktopWindowingMode; import static com.android.window.flags.Flags.enableDesktopWindowingWallpaperActivity; import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_50_50; import android.animation.Animator; Loading Loading @@ -965,12 +966,12 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer @Override public void setResumed() { if (mDesktopVisibilityController != null if (!enableDesktopWindowingWallpaperActivity() && mDesktopVisibilityController != null && mDesktopVisibilityController.areDesktopTasksVisible() && !mDesktopVisibilityController.isRecentsGestureInProgress()) { // Return early to skip setting activity to appear as resumed // TODO(b/255649902): shouldn't be needed when we have a separate launcher state // for desktop that we can use to control other parts of launcher // TODO: b/333533253 - Remove after flag rollout return; } super.setResumed(); Loading Loading
quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java +37 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import static android.view.View.VISIBLE; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.window.flags.Flags.enableDesktopWindowingWallpaperActivity; import android.os.Debug; import android.os.SystemProperties; Loading Loading @@ -141,7 +142,8 @@ public class DesktopVisibilityController { final boolean isVisible = visibleTasksCount > 0; mVisibleDesktopTasksCount = visibleTasksCount; if (wasVisible != isVisible) { if (!enableDesktopWindowingWallpaperActivity() && wasVisible != isVisible) { // TODO: b/333533253 - Remove after flag rollout if (mVisibleDesktopTasksCount > 0) { setLauncherViewsVisibility(View.INVISIBLE); if (!mInOverviewState) { Loading Loading @@ -178,6 +180,10 @@ public class DesktopVisibilityController { } if (overviewStateEnabled != mInOverviewState) { mInOverviewState = overviewStateEnabled; if (enableDesktopWindowingWallpaperActivity()) { return; } // TODO: b/333533253 - Clean up after flag rollout if (mInOverviewState) { setLauncherViewsVisibility(View.VISIBLE); markLauncherResumed(); Loading @@ -190,6 +196,9 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void setBackgroundStateEnabled(boolean backgroundStateEnabled) { if (DEBUG) { Log.d(TAG, "setBackgroundStateEnabled: enabled=" + backgroundStateEnabled Loading @@ -210,6 +219,8 @@ public class DesktopVisibilityController { /** * Whether recents gesture is currently in progress. * * TODO: b/333533253 - Remove after flag rollout */ public boolean isRecentsGestureInProgress() { return mGestureInProgress; Loading @@ -217,6 +228,8 @@ public class DesktopVisibilityController { /** * Notify controller that recents gesture has started. * * TODO: b/333533253 - Remove after flag rollout */ public void setRecentsGestureStart() { if (DEBUG) { Loading @@ -228,6 +241,8 @@ public class DesktopVisibilityController { /** * Notify controller that recents gesture finished with the given * {@link com.android.quickstep.GestureState.GestureEndTarget} * * TODO: b/333533253 - Remove after flag rollout */ public void setRecentsGestureEnd(@Nullable GestureState.GestureEndTarget endTarget) { if (DEBUG) { Loading @@ -241,6 +256,9 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void setRecentsGestureInProgress(boolean gestureInProgress) { if (gestureInProgress != mGestureInProgress) { mGestureInProgress = gestureInProgress; Loading @@ -256,7 +274,13 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void setLauncherViewsVisibility(int visibility) { if (enableDesktopWindowingWallpaperActivity()) { return; } if (DEBUG) { Log.d(TAG, "setLauncherViewsVisibility: visibility=" + visibility + " " + Debug.getCaller()); Loading @@ -275,7 +299,13 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void markLauncherPaused() { if (enableDesktopWindowingWallpaperActivity()) { return; } if (DEBUG) { Log.d(TAG, "markLauncherPaused " + Debug.getCaller()); } Loading @@ -286,7 +316,13 @@ public class DesktopVisibilityController { } } /** * TODO: b/333533253 - Remove after flag rollout */ private void markLauncherResumed() { if (enableDesktopWindowingWallpaperActivity()) { return; } if (DEBUG) { Log.d(TAG, "markLauncherResumed " + Debug.getCaller()); } Loading
quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +5 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.android.launcher3.statemanager.BaseState.FLAG_NON_INTERACTIVE; import static com.android.launcher3.taskbar.TaskbarEduTooltipControllerKt.TOOLTIP_STEP_FEATURES; import static com.android.launcher3.taskbar.TaskbarLauncherStateController.FLAG_VISIBLE; import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS; import static com.android.window.flags.Flags.enableDesktopWindowingWallpaperActivity; import android.animation.Animator; import android.animation.AnimatorSet; Loading Loading @@ -218,9 +219,10 @@ public class LauncherTaskbarUIController extends TaskbarUIController { DesktopVisibilityController desktopController = LauncherActivityInterface.INSTANCE.getDesktopVisibilityController(); final boolean onDesktop = desktopController != null && desktopController.areDesktopTasksVisible(); if (onDesktop) { if (!enableDesktopWindowingWallpaperActivity() && desktopController != null && desktopController.areDesktopTasksVisible()) { // TODO: b/333533253 - Remove after flag rollout isVisible = false; } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +1 −0 Original line number Diff line number Diff line Loading @@ -837,6 +837,7 @@ public class TaskbarLauncherStateController { appendFlag(result, flags, FLAG_LAUNCHER_WAS_ACTIVE_WHILE_AWAKE, "was_active_while_awake"); appendFlag(result, flags, FLAG_DEVICE_LOCKED, "device_locked"); appendFlag(result, flags, FLAG_TASKBAR_HIDDEN, "taskbar_hidden"); return result.toString(); } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +1 −0 Original line number Diff line number Diff line Loading @@ -1165,6 +1165,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba appendFlag(sj, flags, FLAG_STASHED_IN_APP_AUTO, "FLAG_STASHED_IN_APP_AUTO"); appendFlag(sj, flags, FLAG_STASHED_SYSUI, "FLAG_STASHED_SYSUI"); appendFlag(sj, flags, FLAG_STASHED_DEVICE_LOCKED, "FLAG_STASHED_DEVICE_LOCKED"); appendFlag(sj, flags, FLAG_IN_OVERVIEW, "FLAG_IN_OVERVIEW"); return sj.toString(); } Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +4 −3 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import static com.android.quickstep.util.AnimUtils.completeRunnableListCallback; import static com.android.quickstep.util.SplitAnimationTimings.TABLET_HOME_TO_SPLIT; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY; import static com.android.window.flags.Flags.enableDesktopWindowingMode; import static com.android.window.flags.Flags.enableDesktopWindowingWallpaperActivity; import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_50_50; import android.animation.Animator; Loading Loading @@ -965,12 +966,12 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer @Override public void setResumed() { if (mDesktopVisibilityController != null if (!enableDesktopWindowingWallpaperActivity() && mDesktopVisibilityController != null && mDesktopVisibilityController.areDesktopTasksVisible() && !mDesktopVisibilityController.isRecentsGestureInProgress()) { // Return early to skip setting activity to appear as resumed // TODO(b/255649902): shouldn't be needed when we have a separate launcher state // for desktop that we can use to control other parts of launcher // TODO: b/333533253 - Remove after flag rollout return; } super.setResumed(); Loading