DivestOS/Patches/LineageOS-17.1/android_frameworks_base/399740.patch
Tavi 7251c3f1d1
Churn
Signed-off-by: Tavi <tavi@divested.dev>
2024-08-17 12:35:07 -04:00

34 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Linus Tufvesson <lus@google.com>
Date: Mon, 29 Apr 2024 16:32:15 +0200
Subject: [PATCH] Hide SAW subwindows
.. when top window is hidden through Window#setHideOverlayWindows
Bug: 318683640
Test: atest CtsWindowManagerDeviceWindow:HideOverlayWindowsTest
Flag: EXEMPT securityfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c37bc9147086f497ac7b1595083836014f524d5f)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:89bc634cb534b8e0ffd798ac9f9f89ac1be0f785)
Merged-In: If19240f5aec2e048de80d75cbbdc00be47622d7f
Change-Id: If19240f5aec2e048de80d75cbbdc00be47622d7f
---
services/core/java/com/android/server/wm/WindowState.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index cca14d884cdd..4c0aa6492f91 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -2730,8 +2730,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
}
void setForceHideNonSystemOverlayWindowIfNeeded(boolean forceHide) {
+ final int baseType = getBaseType();
if (mOwnerCanAddInternalSystemWindow
- || (!isSystemAlertWindowType(mAttrs.type) && mAttrs.type != TYPE_TOAST)) {
+ || (!isSystemAlertWindowType(baseType) && baseType != TYPE_TOAST)) {
return;
}
if (mForceHideNonSystemOverlayWindow == forceHide) {