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

Commit c8c4a8e2 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Recompute focus in showLw if needed

When the status bar window was relayouted it wasn't visible by
policy (yet). Thus, it couldn't get focus even though
FLAG_NOT_FOCUSABLE was not set. Shortly after, it was made
visible and thus able to receive focus, but nobody actually
kicked off another focus calculation.

Test: Set device password, open camera from lockscreen,
adb shell wm dismiss-keyguard
Fixes: 36242569

Change-Id: Iafbeac45d25490243b701434008e65f545cebbdf
parent de95d544
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2395,6 +2395,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (requestAnim) {
            mService.scheduleAnimationLocked();
        }
        if ((mAttrs.flags & FLAG_NOT_FOCUSABLE) == 0) {
            mService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, false /* updateImWindows */);
        }
        return true;
    }

@@ -2437,6 +2440,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (requestAnim) {
            mService.scheduleAnimationLocked();
        }
        if (mService.mCurrentFocus == this) {
            mService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, false /* updateImWindows */);
        }
        return true;
    }