Merge "Check broadcasts sent from sandbox process UID for intents without an action as well"
This commit is contained in:
committed by
Android (Google) Code Review
commit
f092b23523
@@ -14256,6 +14256,16 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
if (Process.isSdkSandboxUid(realCallingUid)) {
|
||||
SdkSandboxManagerLocal sdkSandboxManagerLocal = LocalManagerRegistry.getManager(
|
||||
SdkSandboxManagerLocal.class);
|
||||
if (sdkSandboxManagerLocal == null) {
|
||||
throw new IllegalStateException("SdkSandboxManagerLocal not found when sending"
|
||||
+ " a broadcast from an SDK sandbox uid.");
|
||||
}
|
||||
sdkSandboxManagerLocal.enforceAllowedToSendBroadcast(intent);
|
||||
}
|
||||
|
||||
boolean timeoutExempt = false;
|
||||
|
||||
if (action != null) {
|
||||
@@ -14266,16 +14276,6 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
|
||||
}
|
||||
|
||||
if (Process.isSdkSandboxUid(realCallingUid)) {
|
||||
SdkSandboxManagerLocal sdkSandboxManagerLocal = LocalManagerRegistry.getManager(
|
||||
SdkSandboxManagerLocal.class);
|
||||
if (sdkSandboxManagerLocal == null) {
|
||||
throw new IllegalStateException("SdkSandboxManagerLocal not found when sending"
|
||||
+ " a broadcast from an SDK sandbox uid.");
|
||||
}
|
||||
sdkSandboxManagerLocal.enforceAllowedToSendBroadcast(intent);
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case Intent.ACTION_MEDIA_SCANNER_SCAN_FILE:
|
||||
UserManagerInternal umInternal = LocalServices.getService(
|
||||
|
||||
Reference in New Issue
Block a user