Loading quickstep/src/com/android/quickstep/FallbackSwipeHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.os.Message; import android.os.Messenger; import android.os.ParcelUuid; import android.os.UserHandle; import android.util.Log; import android.view.Surface; import android.view.SurfaceControl; import android.view.SurfaceControl.Transaction; Loading @@ -57,6 +58,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.anim.SpringAnimationBuilder; import com.android.launcher3.testing.TestProtocol; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.util.AppCloseConfig; Loading Loading @@ -138,6 +140,10 @@ public class FallbackSwipeHandler extends mActiveAnimationFactory = new FallbackHomeAnimationFactory(duration); ActivityOptions options = ActivityOptions.makeCustomAnimation(mContext, 0, 0); Intent intent = new Intent(mGestureState.getHomeIntent()); if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "createHomeAnimationFactory: " + intent.toShortString(true, true, true, false)); } mActiveAnimationFactory.addGestureContract(intent); try { mContext.startActivity(intent, options.toBundle()); Loading quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java +9 −0 Original line number Diff line number Diff line Loading @@ -20,12 +20,14 @@ import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACT import android.graphics.Rect; import android.util.ArraySet; import android.util.Log; import android.view.RemoteAnimationTarget; 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 @@ -95,6 +97,9 @@ public class RecentsAnimationCallbacks implements RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets, Rect homeContentInsets, Rect minimizedHomeBounds) { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "RecentsAnimationCallbacks.onAnimationStart"); } // Convert appTargets to type RemoteAnimationTarget for all apps except Home app RemoteAnimationTarget[] nonHomeApps = Arrays.stream(appTargets) .filter(remoteAnimationTarget -> Loading @@ -116,6 +121,10 @@ public class RecentsAnimationCallbacks implements mController::finishAnimationToApp); } else { Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(), () -> { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "RecentsAnimationCallbacks.onAnimationStart callback"); } for (RecentsAnimationListener listener : getListeners()) { listener.onRecentsAnimationStart(mController, targets); } Loading src/com/android/launcher3/statemanager/StateManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.statemanager; import static android.animation.ValueAnimator.areAnimatorsEnabled; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.AnimatorPlaybackController.callListenerCommandRecursively; import static com.android.launcher3.states.StateAnimationConfig.SKIP_ALL_ANIMATIONS; Loading @@ -27,12 +28,14 @@ import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.os.Handler; import android.os.Looper; import android.util.Log; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.states.StateAnimationConfig; import com.android.launcher3.states.StateAnimationConfig.AnimationFlags; import com.android.launcher3.testing.TestProtocol; import java.io.PrintWriter; import java.util.ArrayList; Loading Loading @@ -253,6 +256,9 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> { if (listener != null) { animation.addListener(listener); } if (TestProtocol.sDebugTracing && state == NORMAL) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "goToStateAnimated: " + state); } mUiHandler.post(new StartAnimRunnable(animation)); } Loading Loading @@ -328,11 +334,17 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> { @Override public void onAnimationStart(Animator animation) { // Change the internal state only when the transition actually starts if (TestProtocol.sDebugTracing && state == NORMAL) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "onAnimationStart: " + state); } onStateTransitionStart(state); } @Override public void onAnimationSuccess(Animator animator) { if (TestProtocol.sDebugTracing && state == NORMAL) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "onAnimationEnd: " + state); } onStateTransitionEnd(state); } }; Loading src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -119,4 +119,5 @@ public final class TestProtocol { public static final String FALLBACK_ACTIVITY_NO_SET = "b/181019015"; public static final String THIRD_PARTY_LAUNCHER_NOT_SET = "b/187080582"; public static final String TASK_VIEW_ID_CRASH = "b/195430732"; public static final String L3_SWIPE_TO_HOME = "b/192018189"; } Loading
quickstep/src/com/android/quickstep/FallbackSwipeHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.os.Message; import android.os.Messenger; import android.os.ParcelUuid; import android.os.UserHandle; import android.util.Log; import android.view.Surface; import android.view.SurfaceControl; import android.view.SurfaceControl.Transaction; Loading @@ -57,6 +58,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.anim.SpringAnimationBuilder; import com.android.launcher3.testing.TestProtocol; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.util.AppCloseConfig; Loading Loading @@ -138,6 +140,10 @@ public class FallbackSwipeHandler extends mActiveAnimationFactory = new FallbackHomeAnimationFactory(duration); ActivityOptions options = ActivityOptions.makeCustomAnimation(mContext, 0, 0); Intent intent = new Intent(mGestureState.getHomeIntent()); if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "createHomeAnimationFactory: " + intent.toShortString(true, true, true, false)); } mActiveAnimationFactory.addGestureContract(intent); try { mContext.startActivity(intent, options.toBundle()); Loading
quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java +9 −0 Original line number Diff line number Diff line Loading @@ -20,12 +20,14 @@ import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACT import android.graphics.Rect; import android.util.ArraySet; import android.util.Log; import android.view.RemoteAnimationTarget; 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 @@ -95,6 +97,9 @@ public class RecentsAnimationCallbacks implements RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets, Rect homeContentInsets, Rect minimizedHomeBounds) { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "RecentsAnimationCallbacks.onAnimationStart"); } // Convert appTargets to type RemoteAnimationTarget for all apps except Home app RemoteAnimationTarget[] nonHomeApps = Arrays.stream(appTargets) .filter(remoteAnimationTarget -> Loading @@ -116,6 +121,10 @@ public class RecentsAnimationCallbacks implements mController::finishAnimationToApp); } else { Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(), () -> { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "RecentsAnimationCallbacks.onAnimationStart callback"); } for (RecentsAnimationListener listener : getListeners()) { listener.onRecentsAnimationStart(mController, targets); } Loading
src/com/android/launcher3/statemanager/StateManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.statemanager; import static android.animation.ValueAnimator.areAnimatorsEnabled; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.AnimatorPlaybackController.callListenerCommandRecursively; import static com.android.launcher3.states.StateAnimationConfig.SKIP_ALL_ANIMATIONS; Loading @@ -27,12 +28,14 @@ import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.os.Handler; import android.os.Looper; import android.util.Log; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.states.StateAnimationConfig; import com.android.launcher3.states.StateAnimationConfig.AnimationFlags; import com.android.launcher3.testing.TestProtocol; import java.io.PrintWriter; import java.util.ArrayList; Loading Loading @@ -253,6 +256,9 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> { if (listener != null) { animation.addListener(listener); } if (TestProtocol.sDebugTracing && state == NORMAL) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "goToStateAnimated: " + state); } mUiHandler.post(new StartAnimRunnable(animation)); } Loading Loading @@ -328,11 +334,17 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> { @Override public void onAnimationStart(Animator animation) { // Change the internal state only when the transition actually starts if (TestProtocol.sDebugTracing && state == NORMAL) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "onAnimationStart: " + state); } onStateTransitionStart(state); } @Override public void onAnimationSuccess(Animator animator) { if (TestProtocol.sDebugTracing && state == NORMAL) { Log.d(TestProtocol.L3_SWIPE_TO_HOME, "onAnimationEnd: " + state); } onStateTransitionEnd(state); } }; Loading
src/com/android/launcher3/testing/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -119,4 +119,5 @@ public final class TestProtocol { public static final String FALLBACK_ACTIVITY_NO_SET = "b/181019015"; public static final String THIRD_PARTY_LAUNCHER_NOT_SET = "b/187080582"; public static final String TASK_VIEW_ID_CRASH = "b/195430732"; public static final String L3_SWIPE_TO_HOME = "b/192018189"; }