DivestOS/Patches/LineageOS-17.1/android_frameworks_base/402606.patch
Tavi a4f9a76fb9
Reconcile picks
Gains 3 backports for 17.1
and an expat backport for 16.0 and 17.1
thanks to @flamefire

Signed-off-by: Tavi <tavi@divested.dev>
2024-09-14 12:10:39 -04:00

34 lines
1.6 KiB
Diff

From d60e8484debe2c0de08f438563f4a1cdd026c501 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 cca14d884cdd8..4c0aa6492f91c 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 @@ boolean hideLw(boolean doAnimation, boolean requestAnim) {
}
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) {