Ignore virtual presentation windows - RESTRICT AUTOMERGE am: bf60a0c6f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23477773 Change-Id: I51b744e5bf154af52447f84a9e93e8040c9e84d3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3534,8 +3534,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
// apps won't always be considered as foreground state.
|
||||
// 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) {
|
||||
// Exclude presentations on virtual displays as they are not actually visible.
|
||||
if (mAttrs.type >= FIRST_SYSTEM_WINDOW
|
||||
&& mAttrs.type != TYPE_TOAST
|
||||
&& mAttrs.type != TYPE_PRIVATE_PRESENTATION
|
||||
&& !(mAttrs.type == TYPE_PRESENTATION && isOnVirtualDisplay())
|
||||
) {
|
||||
mWmService.mAtmService.mActiveUids.onNonAppSurfaceVisibilityChanged(mOwnerUid, shown);
|
||||
}
|
||||
if (mIsImWindow && mWmService.mAccessibilityController != null) {
|
||||
@@ -3543,6 +3547,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isOnVirtualDisplay() {
|
||||
return getDisplayContent().mDisplay.getType() == Display.TYPE_VIRTUAL;
|
||||
}
|
||||
|
||||
private void logExclusionRestrictions(int side) {
|
||||
if (!logsGestureExclusionRestrictions(this)
|
||||
|| SystemClock.uptimeMillis() < mLastExclusionLogUptimeMillis[side]
|
||||
|
||||
Reference in New Issue
Block a user