Respect always unlocked displays when keyguard is shown.

When keyguard is shown on the default display, all secondary displays
report mHasContent=false, even if these displays are created with
FLAG_ALWAYS_UNLOCKED (in practice this means that these displays
belong to an always unlocked virtual device).

Setting mHasContent=false on such displays is wrong - any windows
there are visible and interactive. This also does not propagate
display changes to these windows, which causes a bug when the display
is rotated.

Fix: 285141170
Test: m
Change-Id: Ief1fa2db10c234ba179ba741434ce3d6ebef290e
This commit is contained in:
Vladimir Komsiyski
2023-06-15 08:58:01 +02:00
parent f80ef93530
commit 1df55100cf

View File

@@ -1061,8 +1061,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
displayHasContent = true;
} else if (displayContent != null &&
(!mObscureApplicationContentOnSecondaryDisplays
|| displayContent.isKeyguardAlwaysUnlocked()
|| (obscured && type == TYPE_KEYGUARD_DIALOG))) {
// Allow full screen keyguard presentation dialogs to be seen.
// Allow full screen keyguard presentation dialogs to be seen, or simply ignore the
// keyguard if this display is always unlocked.
displayHasContent = true;
}
if ((privateflags & PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE) != 0) {