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

Commit 0d93fedc authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Remove unnecessary layer assignment on destroy client surface" into main

parents c20eaa67 e580fbd8
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -5792,18 +5792,11 @@ final class ActivityRecord extends WindowToken {
     * surfaces that's eligible, if the app is already stopped.
     */
    private void destroySurfaces(boolean cleanupOnResume) {
        boolean destroyedSomething = false;

        // Copying to a different list as multiple children can be removed.
        final ArrayList<WindowState> children = new ArrayList<>(mChildren);
        for (int i = children.size() - 1; i >= 0; i--) {
            final WindowState win = children.get(i);
            destroyedSomething |= win.destroySurface(cleanupOnResume, mAppStopped);
        }
        if (destroyedSomething) {
            final DisplayContent dc = getDisplayContent();
            dc.assignWindowLayers(true /*setLayoutNeeded*/);
            updateLetterboxSurfaceIfNeeded(null);
            win.destroySurface(cleanupOnResume, mAppStopped);
        }
    }