Loading services/core/java/com/android/server/wm/Session.java +6 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,9 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { private final ArraySet<WindowSurfaceController> mAlertWindowSurfaces = new ArraySet<>(); private final DragDropController mDragDropController; final boolean mCanAddInternalSystemWindow; // If non-system overlays from this process can be hidden by the user or app using // HIDE_NON_SYSTEM_OVERLAY_WINDOWS. final boolean mOverlaysCanBeHidden; final boolean mCanHideNonSystemOverlayWindows; final boolean mCanAcquireSleepToken; private AlertWindowNotification mAlertWindowNotification; Loading @@ -105,6 +108,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED; mCanHideNonSystemOverlayWindows = service.mContext.checkCallingOrSelfPermission( HIDE_NON_SYSTEM_OVERLAY_WINDOWS) == PERMISSION_GRANTED; mOverlaysCanBeHidden = !mCanAddInternalSystemWindow && !mService.mAtmInternal.isCallerRecents(mUid); mCanAcquireSleepToken = service.mContext.checkCallingOrSelfPermission(DEVICE_POWER) == PERMISSION_GRANTED; mShowingAlertWindowNotificationAllowed = mService.mShowAlertWindowNotifications; Loading Loading @@ -534,7 +539,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { boolean changed; if (!mCanAddInternalSystemWindow) { if (mOverlaysCanBeHidden) { // We want to track non-system signature apps adding alert windows so we can post an // on-going notification for the user to control their visibility. if (visible) { Loading services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -3057,7 +3057,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } void setForceHideNonSystemOverlayWindowIfNeeded(boolean forceHide) { if (mOwnerCanAddInternalSystemWindow if (!mSession.mOverlaysCanBeHidden || (!isSystemAlertWindowType(mAttrs.type) && mAttrs.type != TYPE_TOAST)) { return; } Loading Loading
services/core/java/com/android/server/wm/Session.java +6 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,9 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { private final ArraySet<WindowSurfaceController> mAlertWindowSurfaces = new ArraySet<>(); private final DragDropController mDragDropController; final boolean mCanAddInternalSystemWindow; // If non-system overlays from this process can be hidden by the user or app using // HIDE_NON_SYSTEM_OVERLAY_WINDOWS. final boolean mOverlaysCanBeHidden; final boolean mCanHideNonSystemOverlayWindows; final boolean mCanAcquireSleepToken; private AlertWindowNotification mAlertWindowNotification; Loading @@ -105,6 +108,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED; mCanHideNonSystemOverlayWindows = service.mContext.checkCallingOrSelfPermission( HIDE_NON_SYSTEM_OVERLAY_WINDOWS) == PERMISSION_GRANTED; mOverlaysCanBeHidden = !mCanAddInternalSystemWindow && !mService.mAtmInternal.isCallerRecents(mUid); mCanAcquireSleepToken = service.mContext.checkCallingOrSelfPermission(DEVICE_POWER) == PERMISSION_GRANTED; mShowingAlertWindowNotificationAllowed = mService.mShowAlertWindowNotifications; Loading Loading @@ -534,7 +539,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { boolean changed; if (!mCanAddInternalSystemWindow) { if (mOverlaysCanBeHidden) { // We want to track non-system signature apps adding alert windows so we can post an // on-going notification for the user to control their visibility. if (visible) { Loading
services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -3057,7 +3057,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } void setForceHideNonSystemOverlayWindowIfNeeded(boolean forceHide) { if (mOwnerCanAddInternalSystemWindow if (!mSession.mOverlaysCanBeHidden || (!isSystemAlertWindowType(mAttrs.type) && mAttrs.type != TYPE_TOAST)) { return; } Loading