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

Commit 81a9d50c authored by Ricky Wai's avatar Ricky Wai Committed by Android (Google) Code Review
Browse files

Merge "Allow current active live wallpaper app to bypass app switching protection" into sc-dev

parents 3a7975ee 7dee98a9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1275,7 +1275,11 @@ class ActivityStarter {
                || callingUidProcState == ActivityManager.PROCESS_STATE_BOUND_TOP;
        final boolean isCallingUidPersistentSystemProcess =
                callingUidProcState <= ActivityManager.PROCESS_STATE_PERSISTENT_UI;
        if ((appSwitchAllowed && callingUidHasAnyVisibleWindow)

        // Normal apps with visible app window will be allowed to start activity if app switching
        // is allowed, or apps like live wallpaper with non app visible window will be allowed.
        if (((appSwitchAllowed || mService.mActiveUids.hasNonAppVisibleWindow(callingUid))
                && callingUidHasAnyVisibleWindow)
                || isCallingUidPersistentSystemProcess) {
            if (DEBUG_ACTIVITY_STARTS) {
                Slog.d(TAG, "Activity start allowed: callingUidHasAnyVisibleWindow = " + callingUid