Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Region; import android.os.UserHandle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.animation.Interpolator; Loading @@ -53,6 +54,7 @@ import com.android.launcher3.allapps.DiscoveryBounce; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.SpringObjectAnimator; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.views.FloatingIconView; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -174,6 +176,9 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe @Override public AnimationFactory prepareRecentsUI(Launcher activity, boolean activityVisible, boolean animateActivity, Consumer<AnimatorPlaybackController> callback) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "prepareRecentsUI"); } final LauncherState startState = activity.getStateManager().getState(); LauncherState resetState = startState; Loading quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +23 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.os.Build; import android.os.Handler; import android.os.Looper; import android.os.SystemClock; import android.util.Log; import android.view.HapticFeedbackConstants; import android.view.MotionEvent; import android.view.View; Loading @@ -83,6 +84,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.graphics.RotationMode; 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 @@ -457,17 +459,32 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> } private void onLauncherStart(final T activity) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart"); } if (mActivity != activity) { return; } if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 1"); } if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) { return; } if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 2"); } // If we've already ended the gesture and are going home, don't prepare recents UI, // as that will set the state as BACKGROUND_APP, overriding the animation to NORMAL. if (mGestureEndTarget != HOME) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 3"); } Runnable initAnimFactory = () -> { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 4"); } mAnimationFactory = mActivityControlHelper.prepareRecentsUI(mActivity, mWasLauncherAlreadyVisible, true, this::onAnimatorPlaybackControllerCreated); Loading @@ -477,8 +494,14 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> // Launcher is visible, but might be about to stop. Thus, if we prepare recents // now, it might get overridden by moveToRestState() in onStop(). To avoid this, // wait until the next gesture (and possibly launcher) starts. if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 5"); } mStateCallback.addCallback(STATE_GESTURE_STARTED, initAnimFactory); } else { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 6"); } initAnimFactory.run(); } } Loading src/com/android/launcher3/Launcher.java +3 −0 Original line number Diff line number Diff line Loading @@ -879,6 +879,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, @Override protected void onStart() { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "Launcher.onStart"); } RaceConditionTracker.onEvent(ON_START_EVT, ENTER); super.onStart(); if (mLauncherCallbacks != null) { Loading src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -72,4 +72,5 @@ public final class TestProtocol { public static final String NO_DRAG_TAG = "b/133009122"; public static final String NO_START_TAG = "b/132900132"; public static final String NO_START_TASK_TAG = "b/133765434"; public static final String NO_OVERVIEW_EVENT_TAG = "b/134532571"; } tests/tapl/com/android/launcher3/tapl/Background.java +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class Background extends LauncherInstrumentation.VisibleContainer { } protected void goToOverviewUnchecked(int expectedState) { mLauncher.getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING); switch (mLauncher.getNavigationModel()) { case ZERO_BUTTON: { final int centerX = mLauncher.getDevice().getDisplayWidth() / 2; Loading Loading @@ -103,6 +104,7 @@ public class Background extends LauncherInstrumentation.VisibleContainer { mLauncher.waitForSystemUiObject("recent_apps").click(); break; } mLauncher.getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING); } protected String getSwipeHeightRequestName() { Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Region; import android.os.UserHandle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.animation.Interpolator; Loading @@ -53,6 +54,7 @@ import com.android.launcher3.allapps.DiscoveryBounce; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.SpringObjectAnimator; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.views.FloatingIconView; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -174,6 +176,9 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe @Override public AnimationFactory prepareRecentsUI(Launcher activity, boolean activityVisible, boolean animateActivity, Consumer<AnimatorPlaybackController> callback) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "prepareRecentsUI"); } final LauncherState startState = activity.getStateManager().getState(); LauncherState resetState = startState; Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +23 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import android.os.Build; import android.os.Handler; import android.os.Looper; import android.os.SystemClock; import android.util.Log; import android.view.HapticFeedbackConstants; import android.view.MotionEvent; import android.view.View; Loading @@ -83,6 +84,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.graphics.RotationMode; 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 @@ -457,17 +459,32 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> } private void onLauncherStart(final T activity) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart"); } if (mActivity != activity) { return; } if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 1"); } if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) { return; } if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 2"); } // If we've already ended the gesture and are going home, don't prepare recents UI, // as that will set the state as BACKGROUND_APP, overriding the animation to NORMAL. if (mGestureEndTarget != HOME) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 3"); } Runnable initAnimFactory = () -> { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 4"); } mAnimationFactory = mActivityControlHelper.prepareRecentsUI(mActivity, mWasLauncherAlreadyVisible, true, this::onAnimatorPlaybackControllerCreated); Loading @@ -477,8 +494,14 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> // Launcher is visible, but might be about to stop. Thus, if we prepare recents // now, it might get overridden by moveToRestState() in onStop(). To avoid this, // wait until the next gesture (and possibly launcher) starts. if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 5"); } mStateCallback.addCallback(STATE_GESTURE_STARTED, initAnimFactory); } else { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "onLauncherStart 6"); } initAnimFactory.run(); } } Loading
src/com/android/launcher3/Launcher.java +3 −0 Original line number Diff line number Diff line Loading @@ -879,6 +879,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, @Override protected void onStart() { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_OVERVIEW_EVENT_TAG, "Launcher.onStart"); } RaceConditionTracker.onEvent(ON_START_EVT, ENTER); super.onStart(); if (mLauncherCallbacks != null) { Loading
src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -72,4 +72,5 @@ public final class TestProtocol { public static final String NO_DRAG_TAG = "b/133009122"; public static final String NO_START_TAG = "b/132900132"; public static final String NO_START_TASK_TAG = "b/133765434"; public static final String NO_OVERVIEW_EVENT_TAG = "b/134532571"; }
tests/tapl/com/android/launcher3/tapl/Background.java +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class Background extends LauncherInstrumentation.VisibleContainer { } protected void goToOverviewUnchecked(int expectedState) { mLauncher.getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING); switch (mLauncher.getNavigationModel()) { case ZERO_BUTTON: { final int centerX = mLauncher.getDevice().getDisplayWidth() / 2; Loading Loading @@ -103,6 +104,7 @@ public class Background extends LauncherInstrumentation.VisibleContainer { mLauncher.waitForSystemUiObject("recent_apps").click(); break; } mLauncher.getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING); } protected String getSwipeHeightRequestName() { Loading