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

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

Merge "Get the latest display info for overlay change" into tm-qpr-dev

parents 560e645f eb8882f0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1900,8 +1900,10 @@ public class DisplayPolicy {
    /**
     * Called when the resource overlays change.
     */
    public void onOverlayChangedLw() {
    void onOverlayChanged() {
        updateCurrentUserResources();
        // Update the latest display size, cutout.
        mDisplayContent.updateDisplayInfo();
        onConfigurationChanged();
        mSystemGestures.onConfigurationChanged();
    }
+8 −7
Original line number Diff line number Diff line
@@ -7046,13 +7046,14 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    public void onOverlayChanged() {
        // Post to display thread so it can get the latest display info.
        mH.post(() -> {
            synchronized (mGlobalLock) {
            mRoot.forAllDisplays(displayContent -> {
                displayContent.getDisplayPolicy().onOverlayChangedLw();
                displayContent.updateDisplayInfo();
            });
            requestTraversal();
                mAtmService.deferWindowLayout();
                mRoot.forAllDisplays(dc -> dc.getDisplayPolicy().onOverlayChanged());
                mAtmService.continueWindowLayout();
            }
        });
    }

    @Override