From 5f8ead0713ef989f9e2b8066097687e76f861960 Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Fri, 2 Jun 2023 10:45:47 +0000 Subject: Fix aborting transition when deliver to top bellow transient launch ActivityStarter reports DELIVER_TO_TOP when reusing a transient hide task. Although there is no visibility change for the reusing activity, the task order will change so the transition should not be aborted. Fix: 280387453 Test: pass existing tests Test: repro steps of the bug and it won't abort the transition Change-Id: I47c60ea787fc20f8a5956ab0751f20699cef1165 --- services/core/java/com/android/server/wm/ActivityStarter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index 3e3eb570d0e3..ac996c1cfa1f 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -1573,8 +1573,10 @@ class ActivityStarter { // existence change. transitionController.collectExistenceChange(started); } else if (result == START_DELIVERED_TO_TOP && newTransition != null - // An activity has changed order/visibility so this isn't just deliver-to-top - && mMovedToTopActivity == null) { + // An activity has changed order/visibility or the task is occluded by a transient + // activity, so this isn't just deliver-to-top + && mMovedToTopActivity == null + && !transitionController.isTransientHide(startedActivityRootTask)) { // We just delivered to top, so there isn't an actual transition here. if (!forceTransientTransition) { newTransition.abort(); -- cgit v1.2.3-59-g8ed1b