diff --git a/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java b/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java index ae121e2ef4..d087d39955 100644 --- a/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java +++ b/quickstep/src/com/android/launcher3/statehandlers/DesktopVisibilityController.java @@ -16,6 +16,7 @@ package com.android.launcher3.statehandlers; import android.os.SystemProperties; +import android.util.Log; import android.view.View; import com.android.launcher3.Launcher; @@ -29,6 +30,9 @@ import com.android.launcher3.uioverrides.QuickstepLauncher; */ public class DesktopVisibilityController { + private static final String TAG = "DesktopVisController"; + private static final boolean DEBUG = false; + private final Launcher mLauncher; private boolean mFreeformTasksVisible; @@ -58,6 +62,9 @@ public class DesktopVisibilityController { * Sets whether freeform windows are visible and updates launcher visibility based on that. */ public void setFreeformTasksVisible(boolean freeformTasksVisible) { + if (DEBUG) { + Log.d(TAG, "setFreeformTasksVisible: visible=" + freeformTasksVisible); + } if (!isDesktopModeSupported()) { return; } @@ -83,6 +90,9 @@ public class DesktopVisibilityController { * Sets whether the overview is visible and updates launcher visibility based on that. */ public void setOverviewStateEnabled(boolean overviewStateEnabled) { + if (DEBUG) { + Log.d(TAG, "setOverviewStateEnabled: enabled=" + overviewStateEnabled); + } if (!isDesktopModeSupported()) { return; } @@ -109,6 +119,9 @@ public class DesktopVisibilityController { * Sets whether recents gesture is in progress. */ public void setGestureInProgress(boolean gestureInProgress) { + if (DEBUG) { + Log.d(TAG, "setGestureInProgress: inProgress=" + gestureInProgress); + } if (!isDesktopModeSupported()) { return; } @@ -118,6 +131,9 @@ public class DesktopVisibilityController { } private void setLauncherViewsVisibility(int visibility) { + if (DEBUG) { + Log.d(TAG, "setLauncherViewsVisibility: visibility=" + visibility); + } View workspaceView = mLauncher.getWorkspace(); if (workspaceView != null) { workspaceView.setVisibility(visibility); @@ -129,6 +145,9 @@ public class DesktopVisibilityController { } private void markLauncherPaused() { + if (DEBUG) { + Log.d(TAG, "markLauncherPaused"); + } StatefulActivity activity = QuickstepLauncher.ACTIVITY_TRACKER.getCreatedActivity(); if (activity != null) { @@ -137,6 +156,9 @@ public class DesktopVisibilityController { } private void markLauncherResumed() { + if (DEBUG) { + Log.d(TAG, "markLauncherResumed"); + } StatefulActivity activity = QuickstepLauncher.ACTIVITY_TRACKER.getCreatedActivity(); // Check activity state before calling setResumed(). Launcher may have been actually diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 55378785d3..124f15e8ea 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -800,7 +800,7 @@ public class QuickstepLauncher extends Launcher { @Override public void setResumed() { - if (DesktopTaskView.DESKTOP_IS_PROTO2_ENABLED) { + if (DesktopTaskView.DESKTOP_MODE_SUPPORTED) { DesktopVisibilityController controller = mDesktopVisibilityController; if (controller != null && controller.areFreeformTasksVisible() && !controller.isGestureInProgress()) { diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index 274b686ea4..f9ad7491c7 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -20,6 +20,7 @@ import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.quickstep.AbsSwipeUpHandler.RECENTS_ATTACH_DURATION; +import static com.android.quickstep.GestureState.GestureEndTarget.LAST_TASK; import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS; import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_FADE_ANIM; import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_TRANSLATE_X_ANIM; @@ -62,6 +63,7 @@ import com.android.launcher3.util.NavigationMode; import com.android.launcher3.views.ScrimView; import com.android.quickstep.util.ActivityInitListener; import com.android.quickstep.util.AnimatorControllerWithResistance; +import com.android.quickstep.views.DesktopTaskView; import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.recents.model.ThumbnailData; @@ -107,6 +109,20 @@ public abstract class BaseActivityInterface