Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +17 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; import android.os.Build; import android.util.Log; import android.util.Pair; import android.view.MotionEvent; import android.view.View; Loading @@ -48,6 +49,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.util.VibratorWrapper; Loading Loading @@ -198,18 +200,33 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten } protected void startNewTask(int successStateFlag, Consumer<Boolean> resultCallback) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "startNewTask1"); } // Launch the task user scrolled to (mRecentsView.getNextPage()). if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { // We finish recents animation inside launchTask() when live tile is enabled. mRecentsView.getNextPageTaskView().launchTask(false /* animate */, true /* freezeTaskList */); } else { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "startNewTask2"); } int taskId = mRecentsView.getNextPageTaskView().getTask().key.id; mFinishingRecentsAnimationForNewTaskId = taskId; mRecentsAnimationController.finish(true /* toRecents */, () -> { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete1"); } if (!mCanceled) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete2"); } TaskView nextTask = mRecentsView.getTaskView(taskId); if (nextTask != null) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete3"); } nextTask.launchTask(false /* animate */, true /* freezeTaskList */, success -> { resultCallback.accept(success); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.graphics.PointF; import android.graphics.RectF; import android.os.Build; import android.os.SystemClock; import android.util.Log; import android.view.View; import android.view.View.OnApplyWindowInsetsListener; import android.view.ViewTreeObserver.OnDrawListener; Loading @@ -65,6 +66,7 @@ import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; Loading Loading @@ -967,6 +969,9 @@ public class LauncherSwipeHandler<T extends BaseDraggingActivity> windowAnim.addListener(new AnimationSuccessListener() { @Override public void onAnimationSuccess(Animator animator) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onAnimationSuccess"); } if (mRecentsAnimationController == null) { // If the recents animation is interrupted, we still end the running // animation (not canceled) so this is still called. In that case, we can Loading Loading @@ -1190,6 +1195,9 @@ public class LauncherSwipeHandler<T extends BaseDraggingActivity> } private void switchToScreenshot() { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "switchToScreenshot"); } final int runningTaskId = mGestureState.getRunningTaskId(); if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { if (mRecentsAnimationController != null) { Loading quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java +5 −0 Original line number Diff line number Diff line Loading @@ -19,11 +19,13 @@ import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import android.graphics.Rect; import android.util.ArraySet; import android.util.Log; import androidx.annotation.BinderThread; import androidx.annotation.UiThread; import com.android.launcher3.Utilities; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.Preconditions; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; Loading Loading @@ -89,6 +91,9 @@ public class RecentsAnimationCallbacks implements RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets, Rect homeContentInsets, Rect minimizedHomeBounds) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onAnimationStart"); } RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets, wallpaperTargets, homeContentInsets, minimizedHomeBounds); mController = new RecentsAnimationController(animationController, Loading quickstep/src/com/android/quickstep/TaskAnimationManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import androidx.annotation.UiThread; import com.android.launcher3.Utilities; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.testing.TestProtocol; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading @@ -52,6 +53,9 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn @UiThread public RecentsAnimationCallbacks startRecentsAnimation(GestureState gestureState, Intent intent, RecentsAnimationCallbacks.RecentsAnimationListener listener) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "startRecentsAnimation"); } // Notify if recents animation is still running if (mController != null) { String msg = "New recents animation started before old animation completed"; Loading src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -97,4 +97,5 @@ public final class TestProtocol { public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824"; public static final String APP_NOT_DISABLED = "b/139891609"; public static final String NO_SCROLL_END_WIDGETS = "b/152354290"; public static final String NO_START_FROM_RECENTS = "b/152658211"; } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +17 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.PointF; import android.graphics.Rect; import android.graphics.RectF; import android.os.Build; import android.util.Log; import android.util.Pair; import android.view.MotionEvent; import android.view.View; Loading @@ -48,6 +49,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.util.VibratorWrapper; Loading Loading @@ -198,18 +200,33 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten } protected void startNewTask(int successStateFlag, Consumer<Boolean> resultCallback) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "startNewTask1"); } // Launch the task user scrolled to (mRecentsView.getNextPage()). if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { // We finish recents animation inside launchTask() when live tile is enabled. mRecentsView.getNextPageTaskView().launchTask(false /* animate */, true /* freezeTaskList */); } else { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "startNewTask2"); } int taskId = mRecentsView.getNextPageTaskView().getTask().key.id; mFinishingRecentsAnimationForNewTaskId = taskId; mRecentsAnimationController.finish(true /* toRecents */, () -> { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete1"); } if (!mCanceled) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete2"); } TaskView nextTask = mRecentsView.getTaskView(taskId); if (nextTask != null) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete3"); } nextTask.launchTask(false /* animate */, true /* freezeTaskList */, success -> { resultCallback.accept(success); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.graphics.PointF; import android.graphics.RectF; import android.os.Build; import android.os.SystemClock; import android.util.Log; import android.view.View; import android.view.View.OnApplyWindowInsetsListener; import android.view.ViewTreeObserver.OnDrawListener; Loading @@ -65,6 +66,7 @@ import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; Loading Loading @@ -967,6 +969,9 @@ public class LauncherSwipeHandler<T extends BaseDraggingActivity> windowAnim.addListener(new AnimationSuccessListener() { @Override public void onAnimationSuccess(Animator animator) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onAnimationSuccess"); } if (mRecentsAnimationController == null) { // If the recents animation is interrupted, we still end the running // animation (not canceled) so this is still called. In that case, we can Loading Loading @@ -1190,6 +1195,9 @@ public class LauncherSwipeHandler<T extends BaseDraggingActivity> } private void switchToScreenshot() { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "switchToScreenshot"); } final int runningTaskId = mGestureState.getRunningTaskId(); if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { if (mRecentsAnimationController != null) { Loading
quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java +5 −0 Original line number Diff line number Diff line Loading @@ -19,11 +19,13 @@ import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import android.graphics.Rect; import android.util.ArraySet; import android.util.Log; import androidx.annotation.BinderThread; import androidx.annotation.UiThread; import com.android.launcher3.Utilities; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.Preconditions; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; Loading Loading @@ -89,6 +91,9 @@ public class RecentsAnimationCallbacks implements RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets, Rect homeContentInsets, Rect minimizedHomeBounds) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "onAnimationStart"); } RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets, wallpaperTargets, homeContentInsets, minimizedHomeBounds); mController = new RecentsAnimationController(animationController, Loading
quickstep/src/com/android/quickstep/TaskAnimationManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import androidx.annotation.UiThread; import com.android.launcher3.Utilities; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.testing.TestProtocol; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading @@ -52,6 +53,9 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn @UiThread public RecentsAnimationCallbacks startRecentsAnimation(GestureState gestureState, Intent intent, RecentsAnimationCallbacks.RecentsAnimationListener listener) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_START_FROM_RECENTS, "startRecentsAnimation"); } // Notify if recents animation is still running if (mController != null) { String msg = "New recents animation started before old animation completed"; Loading
src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -97,4 +97,5 @@ public final class TestProtocol { public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824"; public static final String APP_NOT_DISABLED = "b/139891609"; public static final String NO_SCROLL_END_WIDGETS = "b/152354290"; public static final String NO_START_FROM_RECENTS = "b/152658211"; }