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.
|
* Called when the resource overlays change.
|
||||||
*/
|
*/
|
||||||
public void onOverlayChangedLw() {
|
void onOverlayChanged() {
|
||||||
updateCurrentUserResources();
|
updateCurrentUserResources();
|
||||||
|
// Update the latest display size, cutout.
|
||||||
|
mDisplayContent.updateDisplayInfo();
|
||||||
onConfigurationChanged();
|
onConfigurationChanged();
|
||||||
mSystemGestures.onConfigurationChanged();
|
mSystemGestures.onConfigurationChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7046,13 +7046,14 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onOverlayChanged() {
|
public void onOverlayChanged() {
|
||||||
synchronized (mGlobalLock) {
|
// Post to display thread so it can get the latest display info.
|
||||||
mRoot.forAllDisplays(displayContent -> {
|
mH.post(() -> {
|
||||||
displayContent.getDisplayPolicy().onOverlayChangedLw();
|
synchronized (mGlobalLock) {
|
||||||
displayContent.updateDisplayInfo();
|
mAtmService.deferWindowLayout();
|
||||||
});
|
mRoot.forAllDisplays(dc -> dc.getDisplayPolicy().onOverlayChanged());
|
||||||
requestTraversal();
|
mAtmService.continueWindowLayout();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user