Loading services/core/java/com/android/server/wm/WindowState.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -3604,12 +3604,20 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // apps won't always be considered as foreground state. // apps won't always be considered as foreground state. // Exclude private presentations as they can only be shown on private virtual displays and // 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. // shouldn't be the cause of an app be considered foreground. if (mAttrs.type >= FIRST_SYSTEM_WINDOW && mAttrs.type != TYPE_TOAST // Exclude presentations on virtual displays as they are not actually visible. && mAttrs.type != TYPE_PRIVATE_PRESENTATION) { 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); mWmService.mAtmService.mActiveUids.onNonAppSurfaceVisibilityChanged(mOwnerUid, shown); } } } } private boolean isOnVirtualDisplay() { return getDisplayContent().mDisplay.getType() == Display.TYPE_VIRTUAL; } private void logExclusionRestrictions(int side) { private void logExclusionRestrictions(int side) { if (!logsGestureExclusionRestrictions(this) if (!logsGestureExclusionRestrictions(this) || SystemClock.uptimeMillis() < mLastExclusionLogUptimeMillis[side] || SystemClock.uptimeMillis() < mLastExclusionLogUptimeMillis[side] Loading Loading
services/core/java/com/android/server/wm/WindowState.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -3604,12 +3604,20 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // apps won't always be considered as foreground state. // apps won't always be considered as foreground state. // Exclude private presentations as they can only be shown on private virtual displays and // 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. // shouldn't be the cause of an app be considered foreground. if (mAttrs.type >= FIRST_SYSTEM_WINDOW && mAttrs.type != TYPE_TOAST // Exclude presentations on virtual displays as they are not actually visible. && mAttrs.type != TYPE_PRIVATE_PRESENTATION) { 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); mWmService.mAtmService.mActiveUids.onNonAppSurfaceVisibilityChanged(mOwnerUid, shown); } } } } private boolean isOnVirtualDisplay() { return getDisplayContent().mDisplay.getType() == Display.TYPE_VIRTUAL; } private void logExclusionRestrictions(int side) { private void logExclusionRestrictions(int side) { if (!logsGestureExclusionRestrictions(this) if (!logsGestureExclusionRestrictions(this) || SystemClock.uptimeMillis() < mLastExclusionLogUptimeMillis[side] || SystemClock.uptimeMillis() < mLastExclusionLogUptimeMillis[side] Loading