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

Commit 31d97faf authored by Alan Stokes's avatar Alan Stokes Committed by android-build-merger
Browse files

Merge "Revert "Don't allow PI-based starts and trampolines when sender"" into qt-dev

am: 03de0806

Change-Id: I722e3b04073ef97b3fb2a6b257f3b49d283fe08b
parents 392a8034 03de0806
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