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

Commit c5c981f5 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 sc-dev
parents 54f3c01d 7a76717b
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -5006,7 +5006,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) {
            }