From 1df55100cf2546c257b3722531a4668d193d3a1e Mon Sep 17 00:00:00 2001 From: Vladimir Komsiyski Date: Thu, 15 Jun 2023 08:58:01 +0200 Subject: 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 --- services/core/java/com/android/server/wm/RootWindowContainer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index 6bab371ba4db..81293402e0d1 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -1061,8 +1061,10 @@ class RootWindowContainer extends WindowContainer 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) { -- cgit v1.2.3-59-g8ed1b