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

Commit 801ba1b0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "RESTRICT AUTOMERGE Log to detect usage of whitelistToken when sending...

Merge "RESTRICT AUTOMERGE Log to detect usage of whitelistToken when sending non-PI target" into tm-dev
parents 8a3e02ce e5069813
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -5439,7 +5439,20 @@ public class ActivityManagerService extends IActivityManager.Stub
                intent = new Intent(Intent.ACTION_MAIN);
            }
            try {
                target.send(code, intent, resolvedType, allowlistToken, null,
                if (allowlistToken != null) {
                    final int callingUid = Binder.getCallingUid();
                    final String packageName;
                    final long token = Binder.clearCallingIdentity();
                    try {
                        packageName = AppGlobals.getPackageManager().getNameForUid(callingUid);
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                    Slog.wtf(TAG, "Send a non-null allowlistToken to a non-PI target."
                            + " Calling package: " + packageName + "; intent: " + intent
                            + "; options: " + options);
                }
                target.send(code, intent, resolvedType, null, null,
                        requiredPermission, options);
            } catch (RemoteException e) {
            }