Skip to content
Snippets Groups Projects
Commit 0b29810e authored by Nan Wu's avatar Nan Wu Committed by Automerger Merge Worker
Browse files
parents ccc748a0 5f12deec
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,6 @@ import android.app.AppOpsManagerInternal.CheckOpsDelegate;
import android.app.ApplicationErrorReport;
import android.app.ApplicationExitInfo;
import android.app.ApplicationThreadConstants;
import android.app.AppOpsManager;
import android.app.BroadcastOptions;
import android.app.ContentProviderHolder;
import android.app.IActivityController;
......@@ -5775,12 +5774,12 @@ public class ActivityManagerService extends IActivityManager.Stub
}
 
@Override
public int sendIntentSender(IIntentSender target, IBinder whitelistToken, int code,
public int sendIntentSender(IIntentSender target, IBinder allowlistToken, int code,
Intent intent, String resolvedType,
IIntentReceiver finishedReceiver, String requiredPermission, Bundle options) {
if (target instanceof PendingIntentRecord) {
return ((PendingIntentRecord)target).sendWithResult(code, intent, resolvedType,
whitelistToken, finishedReceiver, requiredPermission, options);
allowlistToken, finishedReceiver, requiredPermission, options);
} else {
if (intent == null) {
// Weird case: someone has given us their own custom IIntentSender, and now
......@@ -5792,7 +5791,20 @@ public class ActivityManagerService extends IActivityManager.Stub
intent = new Intent(Intent.ACTION_MAIN);
}
try {
target.send(code, intent, resolvedType, whitelistToken, 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) {
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment