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

Commit cc946a4d authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Revert "Reduce unnecessary visibility update after resumed"

This reverts commit ebfda4b1.

Reason for revert: b/342028446 b/346603558

Change-Id: I0b440e3e9603e1040157a3b0b267a6f2cd4d8c9e
parent ebfda4b1
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -6541,10 +6541,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // Schedule an idle timeout in case the app doesn't do it for us.
        mTaskSupervisor.scheduleIdleTimeout(this);
        mTaskSupervisor.mStoppingActivities.remove(this);
        if (getDisplayArea().allResumedActivitiesComplete()) {
            mRootWindowContainer.executeAppTransitionForAllDisplay();
        }
        mTaskSupervisor.reportResumedActivityLocked(this);
        resumeKeyDispatchingLocked();
        final Task rootTask = getRootTask();
+15 −0
Original line number Diff line number Diff line
@@ -2064,6 +2064,21 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
        }
    }

    boolean reportResumedActivityLocked(ActivityRecord r) {
        // A resumed activity cannot be stopping. remove from list
        mStoppingActivities.remove(r);

        final Task rootTask = r.getRootTask();
        if (rootTask.getDisplayArea().allResumedActivitiesComplete()) {
            mRootWindowContainer.ensureActivitiesVisible();
            // Make sure activity & window visibility should be identical
            // for all displays in this stage.
            mRootWindowContainer.executeAppTransitionForAllDisplay();
            return true;
        }
        return false;
    }

    // Called when WindowManager has finished animating the launchingBehind activity to the back.
    private void handleLaunchTaskBehindCompleteLocked(ActivityRecord r) {
        final Task task = r.getTask();
+0 −2
Original line number Diff line number Diff line
@@ -1894,7 +1894,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
            // Don't do recursive work.
            return;
        }
        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "RWC_ensureActivitiesVisible");
        mTaskSupervisor.beginActivityVisibilityUpdate();
        try {
            // First the front root tasks. In case any are not fullscreen and are in front of home.
@@ -1904,7 +1903,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
            }
        } finally {
            mTaskSupervisor.endActivityVisibilityUpdate();
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
    }