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

Commit 4b2905c8 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Revert "Don't allow PI-based starts and trampolines when...

Merge "Merge "Revert "Don't allow PI-based starts and trampolines when sender"" into qt-dev am: 03de0806 am: 31d97faf"
parents 61b13c0b b59b9cbe
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.content.Intent;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.TransactionTooLargeException;
@@ -388,9 +387,8 @@ public final class PendingIntentRecord extends IIntentSender.Stub {
                userId = controller.mUserController.getCurrentOrTargetUserId();
            }
            // temporarily allow receivers and services to open activities from background if the
            // PendingIntent.send() caller was foreground at the time of sendInner() call, unless
            // caller is SYSTEM_UID
            final boolean allowTrampoline = uid != callingUid && callingUid != Process.SYSTEM_UID
            // PendingIntent.send() caller was foreground at the time of sendInner() call
            final boolean allowTrampoline = uid != callingUid
                    && controller.mAtmInternal.isUidForeground(callingUid);

            // note: we on purpose don't pass in the information about the PendingIntent's creator,
+2 −3
Original line number Diff line number Diff line
@@ -976,9 +976,8 @@ class ActivityStarter {
                : (realCallingAppId == Process.SYSTEM_UID)
                        || realCallingUidProcState <= ActivityManager.PROCESS_STATE_PERSISTENT_UI;
        if (realCallingUid != callingUid) {
            // don't abort if the realCallingUid has a visible window, unless realCallingUid is
            // SYSTEM_UID, in which case it start needs to be explicitly whitelisted
            if (realCallingUidHasAnyVisibleWindow && realCallingAppId != Process.SYSTEM_UID) {
            // don't abort if the realCallingUid has a visible window
            if (realCallingUidHasAnyVisibleWindow) {
                return false;
            }
            // if the realCallingUid is a persistent system process, abort if the IntentSender