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

Commit f092b235 authored by Palak Chaudhary's avatar Palak Chaudhary Committed by Android (Google) Code Review
Browse files

Merge "Check broadcasts sent from sandbox process UID for intents without an action as well"

parents bed372e1 904870f0
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -14256,16 +14256,6 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
        }
        boolean timeoutExempt = false;
        if (action != null) {
            if (getBackgroundLaunchBroadcasts().contains(action)) {
                if (DEBUG_BACKGROUND_CHECK) {
                    Slog.i(TAG, "Broadcast action " + action + " forcing include-background");
                }
                intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            }
        if (Process.isSdkSandboxUid(realCallingUid)) {
            SdkSandboxManagerLocal sdkSandboxManagerLocal = LocalManagerRegistry.getManager(
                    SdkSandboxManagerLocal.class);
@@ -14276,6 +14266,16 @@ public class ActivityManagerService extends IActivityManager.Stub
            sdkSandboxManagerLocal.enforceAllowedToSendBroadcast(intent);
        }
        boolean timeoutExempt = false;
        if (action != null) {
            if (getBackgroundLaunchBroadcasts().contains(action)) {
                if (DEBUG_BACKGROUND_CHECK) {
                    Slog.i(TAG, "Broadcast action " + action + " forcing include-background");
                }
                intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            }
            switch (action) {
                case Intent.ACTION_MEDIA_SCANNER_SCAN_FILE:
                    UserManagerInternal umInternal = LocalServices.getService(