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
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 02e4fe0..a55fec5 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -2009,5 +2009,14 @@
mDisplayPowerController.persistBrightnessSliderEvents();
}
}
+
+ @Override
+ public void onOverlayChanged() {
+ synchronized (mSyncRoot) {
+ if (updateLogicalDisplaysLocked()) {
+ scheduleTraversalLocked(false);
+ }
+ }
+ }
}
}