Reacquire wm lock when positing to handler

Fixes: 144624999
Test: go/wm-smoke
Change-Id: I1c7b485952cd7db61587d172367aa37f83ff925d
This commit is contained in:
Vishnu Nair
2019-11-18 15:56:30 -08:00
parent 94a1780686
commit 015d8cd602

View File

@@ -3122,12 +3122,13 @@ public class DisplayPolicy {
: new AppearanceRegion[]{
new AppearanceRegion(fullscreenAppearance, fullscreenStackBounds)};
final boolean isNavbarColorManagedByIme = result.second;
String cause = win.toString();
mHandler.post(() -> {
StatusBarManagerInternal statusBar = getStatusBarManagerInternal();
if (statusBar != null) {
final int displayId = getDisplayId();
statusBar.setDisableFlags(displayId, visibility & StatusBarManager.DISABLE_MASK,
win.toString());
cause);
if (transientState.first.length > 0) {
statusBar.showTransient(displayId, transientState.first);
}
@@ -3139,8 +3140,10 @@ public class DisplayPolicy {
statusBar.topAppWindowChanged(displayId, isFullscreen, isImmersive);
// TODO(b/118118435): Remove this after removing system UI visibilities.
mDisplayContent.statusBarVisibilityChanged(
visibility & ~(View.STATUS_BAR_UNHIDE | View.NAVIGATION_BAR_UNHIDE));
synchronized (mLock) {
mDisplayContent.statusBarVisibilityChanged(
visibility & ~(View.STATUS_BAR_UNHIDE | View.NAVIGATION_BAR_UNHIDE));
}
}
});
return diff;