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

Commit e1d68cda authored by Adrian Roos's avatar Adrian Roos
Browse files

DisplayCutout: Reload displays when resource overlays change

This allows the DisplayManager to pick up changes to the
DisplayCutout resource, which is used to implement emulation
of the overlay.

Bug: x
Test: adb shell overlay enable ...; verify cutout is picked up immediately and not only after toggling the display
Change-Id: I0fa2d50366a17231f45990d2d3854321d48653f0
parent 7d0e1f80
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -178,6 +178,11 @@ public abstract class DisplayManagerInternal {
     */
    public abstract void persistBrightnessSliderEvents();

    /**
     * Notifies the display manager that resource overlays have changed.
     */
    public abstract void onOverlayChanged();

    /**
     * Describes the requested power state of the display.
     *
+9 −0
Original line number Diff line number Diff line
@@ -2009,5 +2009,14 @@ public final class DisplayManagerService extends SystemService {
                mDisplayPowerController.persistBrightnessSliderEvents();
            }
        }

        @Override
        public void onOverlayChanged() {
            synchronized (mSyncRoot) {
                if (updateLogicalDisplaysLocked()) {
                    scheduleTraversalLocked(false);
                }
            }
        }
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -6600,6 +6600,7 @@ public class WindowManagerService extends IWindowManager.Stub
    public void onOverlayChanged() {
        synchronized (mWindowMap) {
            mPolicy.onOverlayChangedLw();
            mDisplayManagerInternal.onOverlayChanged();
            requestTraversal();
        }
    }