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

Commit 4540f1b5 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Defer resuming activity while applying WCT" into main

parents 31e9a622 5be69389
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10302,7 +10302,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (rootTask != null && rootTask.mTranslucentActivityWaiting == this) {
            rootTask.checkTranslucentActivityWaiting(null);
        }
        final boolean andResume = shouldBeResumed(null /*activeActivity*/);
        final boolean andResume = isState(RESUMED) || shouldBeResumed(null /*activeActivity*/);
        List<ResultInfo> pendingResults = null;
        List<ReferrerIntent> pendingNewIntents = null;
        if (andResume) {
+7 −0
Original line number Diff line number Diff line
@@ -609,6 +609,8 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
        int effects = TRANSACT_EFFECTS_NONE;
        ProtoLog.v(WM_DEBUG_WINDOW_ORGANIZER, "Apply window transaction, syncId=%d", syncId);
        mService.deferWindowLayout();
        mService.mTaskSupervisor.beginDeferResume();
        boolean deferResume = true;
        mService.mTaskSupervisor.setDeferRootVisibilityUpdate(true /* deferUpdate */);
        final boolean shouldDeferTransitionReady = transition != null && !t.isEmpty()
                && (transition.isCollecting() || Flags.alwaysDeferTransitionWhenApplyWct());
@@ -750,6 +752,8 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
            }
            if ((effects & TRANSACT_EFFECTS_LIFECYCLE) != 0) {
                mService.mTaskSupervisor.setDeferRootVisibilityUpdate(false /* deferUpdate */);
                mService.mTaskSupervisor.endDeferResume();
                deferResume = false;
                // Already calls ensureActivityConfig
                mService.mRootWindowContainer.ensureActivitiesVisible();
                mService.mRootWindowContainer.resumeFocusedTasksTopActivities();
@@ -771,6 +775,9 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                transition.continueTransitionReady();
            }
            mService.mTaskSupervisor.setDeferRootVisibilityUpdate(false /* deferUpdate */);
            if (deferResume) {
                mService.mTaskSupervisor.endDeferResume();
            }
            mService.continueWindowLayout();
        }
        return effects;