Loading core/res/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -2698,11 +2698,11 @@ The app can check whether it has this authorization by calling {@link android.provider.Settings#canDrawOverlays Settings.canDrawOverlays()}. <p>Protection level: signature|appop|installer|recents|appPredictor|pre23|development --> <p>Protection level: signature|appop|installer|appPredictor|pre23|development --> <permission android:name="android.permission.SYSTEM_ALERT_WINDOW" android:label="@string/permlab_systemAlertWindow" android:description="@string/permdesc_systemAlertWindow" android:protectionLevel="signature|appop|installer|recents|appPredictor|pre23|development" /> android:protectionLevel="signature|appop|installer|appPredictor|pre23|development" /> <!-- @SystemApi @hide Allows an application to create windows using the type {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY}, Loading services/core/java/com/android/server/wm/Session.java +1 −6 Original line number Diff line number Diff line Loading @@ -104,9 +104,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final boolean mCanAddInternalSystemWindow; private final boolean mCanStartTasksFromRecents; // 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 mCanCreateSystemApplicationOverlay; final boolean mCanHideNonSystemOverlayWindows; final boolean mCanAcquireSleepToken; Loading Loading @@ -136,8 +133,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { == PERMISSION_GRANTED; mCanStartTasksFromRecents = service.mContext.checkCallingOrSelfPermission( START_TASKS_FROM_RECENTS) == PERMISSION_GRANTED; mOverlaysCanBeHidden = !mCanAddInternalSystemWindow && !mService.mAtmInternal.isCallerRecents(mUid); mCanAcquireSleepToken = service.mContext.checkCallingOrSelfPermission(DEVICE_POWER) == PERMISSION_GRANTED; mShowingAlertWindowNotificationAllowed = mService.mShowAlertWindowNotifications; Loading Loading @@ -682,7 +677,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { boolean changed; if (mOverlaysCanBeHidden && !mCanCreateSystemApplicationOverlay) { if (!mCanAddInternalSystemWindow && !mCanCreateSystemApplicationOverlay) { // We want to track non-system 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 @@ -3100,7 +3100,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } void setForceHideNonSystemOverlayWindowIfNeeded(boolean forceHide) { if (!mSession.mOverlaysCanBeHidden if (mSession.mCanAddInternalSystemWindow || (!isSystemAlertWindowType(mAttrs.type) && mAttrs.type != TYPE_TOAST)) { return; } Loading Loading
core/res/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -2698,11 +2698,11 @@ The app can check whether it has this authorization by calling {@link android.provider.Settings#canDrawOverlays Settings.canDrawOverlays()}. <p>Protection level: signature|appop|installer|recents|appPredictor|pre23|development --> <p>Protection level: signature|appop|installer|appPredictor|pre23|development --> <permission android:name="android.permission.SYSTEM_ALERT_WINDOW" android:label="@string/permlab_systemAlertWindow" android:description="@string/permdesc_systemAlertWindow" android:protectionLevel="signature|appop|installer|recents|appPredictor|pre23|development" /> android:protectionLevel="signature|appop|installer|appPredictor|pre23|development" /> <!-- @SystemApi @hide Allows an application to create windows using the type {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY}, Loading
services/core/java/com/android/server/wm/Session.java +1 −6 Original line number Diff line number Diff line Loading @@ -104,9 +104,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final boolean mCanAddInternalSystemWindow; private final boolean mCanStartTasksFromRecents; // 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 mCanCreateSystemApplicationOverlay; final boolean mCanHideNonSystemOverlayWindows; final boolean mCanAcquireSleepToken; Loading Loading @@ -136,8 +133,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { == PERMISSION_GRANTED; mCanStartTasksFromRecents = service.mContext.checkCallingOrSelfPermission( START_TASKS_FROM_RECENTS) == PERMISSION_GRANTED; mOverlaysCanBeHidden = !mCanAddInternalSystemWindow && !mService.mAtmInternal.isCallerRecents(mUid); mCanAcquireSleepToken = service.mContext.checkCallingOrSelfPermission(DEVICE_POWER) == PERMISSION_GRANTED; mShowingAlertWindowNotificationAllowed = mService.mShowAlertWindowNotifications; Loading Loading @@ -682,7 +677,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { boolean changed; if (mOverlaysCanBeHidden && !mCanCreateSystemApplicationOverlay) { if (!mCanAddInternalSystemWindow && !mCanCreateSystemApplicationOverlay) { // We want to track non-system 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 @@ -3100,7 +3100,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } void setForceHideNonSystemOverlayWindowIfNeeded(boolean forceHide) { if (!mSession.mOverlaysCanBeHidden if (mSession.mCanAddInternalSystemWindow || (!isSystemAlertWindowType(mAttrs.type) && mAttrs.type != TYPE_TOAST)) { return; } Loading