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
This commit is contained in:
Jerry Chang
2023-06-02 10:45:47 +00:00
parent 51e65b5aac
commit 5f8ead0713

View File

@@ -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();