summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Linus Tufvesson <lus@google.com> 2021-11-26 11:20:46 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-11-26 11:20:46 +0000
commitcacb978b2aaa40c28b7cd00c2c25563fe9eb14ec (patch)
tree254c28b500a1b1c2d57c8eed86aac17ca4fd15c8
parentdf8f2a9001a77ac0f96f43ca3120e06d55c356af (diff)
parent8e4efdb653ed38a6b9c3d306208557352d52cbd5 (diff)
Merge "Exclude TYPE_PRIVATE_PRESENTATION app visiblity"
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 44edaa256283..bae5465c4fa2 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -3409,7 +3409,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
}
// Exclude toast because legacy apps may show toast window by themselves, so the misused
// apps won't always be considered as foreground state.
- if (mAttrs.type >= FIRST_SYSTEM_WINDOW && mAttrs.type != TYPE_TOAST) {
+ // Exclude private presentations as they can only be shown on private virtual displays and
+ // shouldn't be the cause of an app be considered foreground.
+ if (mAttrs.type >= FIRST_SYSTEM_WINDOW && mAttrs.type != TYPE_TOAST
+ && mAttrs.type != TYPE_PRIVATE_PRESENTATION) {
mWmService.mAtmService.mActiveUids.onNonAppSurfaceVisibilityChanged(mOwnerUid, shown);
}
}