Merge "Get the latest display info for overlay change" into tm-qpr-dev
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -7046,13 +7046,14 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
|
||||
public void onOverlayChanged() {
|
||||
synchronized (mGlobalLock) {
|
||||
mRoot.forAllDisplays(displayContent -> {
|
||||
displayContent.getDisplayPolicy().onOverlayChangedLw();
|
||||
displayContent.updateDisplayInfo();
|
||||
});
|
||||
requestTraversal();
|
||||
}
|
||||
// Post to display thread so it can get the latest display info.
|
||||
mH.post(() -> {
|
||||
synchronized (mGlobalLock) {
|
||||
mAtmService.deferWindowLayout();
|
||||
mRoot.forAllDisplays(dc -> dc.getDisplayPolicy().onOverlayChanged());
|
||||
mAtmService.continueWindowLayout();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user