Revert "Make sure display config is updated when cutout is changed"

This reverts commit 08a3049126.

Reason for revert: b/227625246

Change-Id: If26a4b602d29e387ac7150edbedd7ddc5a6d7372
This commit is contained in:
Riddle Hsu
2022-04-01 14:50:16 +00:00
parent 08a3049126
commit 75bf015ba5
2 changed files with 9 additions and 17 deletions

View File

@@ -1814,14 +1814,10 @@ public class DisplayPolicy {
/**
* Called when the resource overlays change.
*/
void onOverlayChanged() {
public void onOverlayChangedLw() {
updateCurrentUserResources();
// Update the latest display size, cutout.
mDisplayContent.updateDisplayInfo();
// The height of status bar needs to update in case display cutout is changed.
onConfigurationChanged();
// The height of status bar can affect screen size configuration.
mDisplayContent.reconfigureDisplayLocked();
mSystemGestures.onConfigurationChanged();
}
/**

View File

@@ -6967,17 +6967,13 @@ 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) {
mAtmService.deferWindowLayout();
try {
mRoot.forAllDisplays(dc -> dc.getDisplayPolicy().onOverlayChanged());
} finally {
mAtmService.continueWindowLayout();
}
}
});
synchronized (mGlobalLock) {
mRoot.forAllDisplays(displayContent -> {
displayContent.getDisplayPolicy().onOverlayChangedLw();
displayContent.updateDisplayInfo();
});
requestTraversal();
}
}
@Override