Don't moveToRestState from onTaskAppeared

There's a possible race here where we call moveToRestState before
Launcher is actually stopped, so it starts to animate the state
change, causing a visual jump before it gets stopped. We already call
moveToRestState in StatefulActivity#onStop, so this one shouldn't be
necessary anyway.

Test: Enable Winscope tracing, quick switch from app A to app B; before
this change, 9/10 times it would repro the jump in the bug, 0/10 times
after this fix. (Also verified through debug logging.)
Fixes: 244583136

Change-Id: I656b028f26a64f872960cb3fe87c39b097431511
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 24bb393..7ae2ae8 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -2070,7 +2070,6 @@
             if (handleTaskAppeared(appearedTaskTargets)) {
                 mRecentsAnimationController.finish(false /* toRecents */,
                         null /* onFinishComplete */);
-                mActivityInterface.onLaunchTaskSuccess();
                 ActiveGestureLog.INSTANCE.addLog(
                         /* event= */ "finishRecentsAnimation",
                         /* extras= */ false,
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index 315a91e..226b173 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -183,14 +183,6 @@
 
     public abstract void onLaunchTaskFailed();
 
-    public void onLaunchTaskSuccess() {
-        ACTIVITY_TYPE activity = getCreatedActivity();
-        if (activity == null) {
-            return;
-        }
-        activity.getStateManager().moveToRestState();
-    }
-
     /**
      * Closes any overlays.
      */