Merge "Exclude TYPE_PRIVATE_PRESENTATION app visiblity" into sc-v2-dev am: 80b9d0eb42

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16357600

Change-Id: I788abca9d15af2686ab094d7a7c495577634b42c
This commit is contained in:
Linus Tufvesson
2021-12-22 09:49:11 +00:00
committed by Automerger Merge Worker

View File

@@ -3614,7 +3614,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
} }
// Exclude toast because legacy apps may show toast window by themselves, so the misused // Exclude toast because legacy apps may show toast window by themselves, so the misused
// apps won't always be considered as foreground state. // 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); mWmService.mAtmService.mActiveUids.onNonAppSurfaceVisibilityChanged(mOwnerUid, shown);
} }
if (mIsImWindow && mWmService.mAccessibilityController.hasCallbacks()) { if (mIsImWindow && mWmService.mAccessibilityController.hasCallbacks()) {