From 017bbc098a18ff0e52e078f3b0c86ecaf3f9d44e Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 23 Sep 2022 14:14:52 -0700 Subject: [PATCH] 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 --- .../src/com/android/quickstep/AbsSwipeUpHandler.java | 1 - .../src/com/android/quickstep/BaseActivityInterface.java | 8 -------- 2 files changed, 9 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 24bb393f0f..7ae2ae8a18 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -2070,7 +2070,6 @@ public abstract class AbsSwipeUpHandler, 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 315a91e0a1..226b173ecd 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -183,14 +183,6 @@ public abstract class BaseActivityInterface