Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2e51853 authored by Linus Tufvesson's avatar Linus Tufvesson Committed by Android (Google) Code Review
Browse files

Merge "Remove special handling of recents" into sc-dev

parents 51fbb494 35e18c5f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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},
+1 −6
Original line number Diff line number Diff line
@@ -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;
@@ -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;
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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;
        }