diff options
| author | 2022-11-23 18:45:12 +0000 | |
|---|---|---|
| committer | 2022-11-23 18:45:12 +0000 | |
| commit | 09eac84a540f014b3da8c119930f7f6b9d92f5c0 (patch) | |
| tree | 97857ee7dafe637580d184ec5ae27198d8207c51 | |
| parent | fcf754df5b2c3898990cd4ee8e3713f913f9d69b (diff) | |
| parent | 9a4eb43b6b1cc72e013766322ec977f96e7dc705 (diff) | |
Merge "Fix blocking task switch when 3P launcher is used." into tm-qpr-dev am: b7b84320d4 am: 9a4eb43b6b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20542766
Change-Id: I950f018e551ad5bab2868be5f3ad8235378810f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/wm/AppTransitionController.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/AppTransitionController.java b/services/core/java/com/android/server/wm/AppTransitionController.java index 5380de760a82..fca974325b3b 100644 --- a/services/core/java/com/android/server/wm/AppTransitionController.java +++ b/services/core/java/com/android/server/wm/AppTransitionController.java @@ -1212,13 +1212,23 @@ public class AppTransitionController { "Delaying app transition for screen rotation animation to finish"); return false; } + final boolean isRecentsInOpening = mDisplayContent.mOpeningApps.stream().anyMatch( + ConfigurationContainer::isActivityTypeRecents); for (int i = 0; i < apps.size(); i++) { WindowContainer wc = apps.valueAt(i); final ActivityRecord activity = getAppFromContainer(wc); if (activity == null) { continue; } - if (activity.isAnimating(PARENTS, ANIMATION_TYPE_RECENTS)) { + // In order to avoid visual clutter caused by a conflict between app transition + // animation and recents animation, app transition is delayed until recents finishes. + // One exceptional case. When 3P launcher is used and a user taps a task screenshot in + // task switcher (isRecentsInOpening=true), app transition must start even though + // recents is running. Otherwise app transition is blocked until timeout (b/232984498). + // When 1P launcher is used, this animation is controlled by the launcher outside of + // the app transition, so delaying app transition doesn't cause visible delay. After + // recents finishes, app transition is handled just to commit visibility on apps. + if (!isRecentsInOpening && activity.isAnimating(PARENTS, ANIMATION_TYPE_RECENTS)) { ProtoLog.v(WM_DEBUG_APP_TRANSITIONS, "Delaying app transition for recents animation to finish"); return false; |