Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 015d8cd6 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Reacquire wm lock when positing to handler

Fixes: 144624999
Test: go/wm-smoke
Change-Id: I1c7b485952cd7db61587d172367aa37f83ff925d
parent 94a17806
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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,9 +3140,11 @@ public class DisplayPolicy {
                statusBar.topAppWindowChanged(displayId, isFullscreen, isImmersive);

                // TODO(b/118118435): Remove this after removing system UI visibilities.
                synchronized (mLock) {
                    mDisplayContent.statusBarVisibilityChanged(
                            visibility & ~(View.STATUS_BAR_UNHIDE | View.NAVIGATION_BAR_UNHIDE));
                }
            }
        });
        return diff;
    }