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

Commit cd482381 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

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

Merge "Get the latest display info for overlay change" into tm-qpr-dev am: 3ad54047 am: f644bd84

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19492302



Change-Id: Ia288aebe902a7cd468924a8bb74660dbec8e3070
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 02e7a222 f644bd84
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
@@ -7041,13 +7041,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