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

Commit 0b41e85c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Do not let snapshot window control the bar" into sc-v2-dev am: 61569f50 am: a5f2f84f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16130260

Change-Id: I6e7c6c1e7ac248fec4fff543635055a6381880c1
parents 556574aa a5f2f84f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2231,10 +2231,15 @@ public class DisplayPolicy {
    }

    void updateSystemBarAttributes() {
        WindowState winCandidate = mFocusedWindow;
        if (winCandidate == null && mTopFullscreenOpaqueWindowState != null
                && (mTopFullscreenOpaqueWindowState.mAttrs.flags
                & WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE) == 0) {
            // Only focusable window can take system bar control.
            winCandidate = mTopFullscreenOpaqueWindowState;
        }
        // If there is no window focused, there will be nobody to handle the events
        // anyway, so just hang on in whatever state we're in until things settle down.
        WindowState winCandidate = mFocusedWindow != null ? mFocusedWindow
                : mTopFullscreenOpaqueWindowState;
        if (winCandidate == null) {
            return;
        }