Merge "Do not wait for transient hide transition targets" into udc-dev

This commit is contained in:
Riddle Hsu
2023-03-24 12:26:45 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 0 deletions

View File

@@ -10428,6 +10428,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
@Override
boolean isSyncFinished() {
if (task != null && mTransitionController.isTransientHide(task)) {
// The activity keeps visibleRequested but may be hidden later, so no need to wait for
// it to be drawn.
return true;
}
if (!super.isSyncFinished()) return false;
if (mDisplayContent != null && mDisplayContent.mUnknownAppVisibilityController
.isVisibilityUnknown(this)) {

View File

@@ -1415,6 +1415,8 @@ public class TransitionTests extends WindowTestsBase {
final Transition.ChangeInfo activity1ChangeInfo = closeTransition.mChanges.get(activity1);
assertNotNull(activity1ChangeInfo);
assertTrue(activity1ChangeInfo.hasChanged());
// No need to wait for the activity in transient hide task.
assertTrue(activity1.isSyncFinished());
activity1.setVisibleRequested(false);
activity2.setVisibleRequested(true);