Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fbc5aa6 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Do not wait for transient hide transition targets

This avoids the latency to start transient transition when
the activities in the hiding tasks are slow to report drawn.

Fix: 275031340
Test: atest TransitionTests#testTransientLaunch
Change-Id: Iaaf2221150d956f509d6f9365e29da12f3243e5e
parent 0674cd7e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -10421,6 +10421,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)) {
+2 −0
Original line number Diff line number Diff line
@@ -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);