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

Commit 8c72ab3e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Shuffle around shell protected broadcast checks."

parents 5f1d1cf7 90da5a7c
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -17890,6 +17890,11 @@ public class ActivityManagerService extends IActivityManager.Stub
    private void checkBroadcastFromSystem(Intent intent, ProcessRecord callerApp,
            String callerPackage, int callingUid, boolean isProtectedBroadcast, List receivers) {
        if ((intent.getFlags() & Intent.FLAG_RECEIVER_FROM_SHELL) != 0) {
            // Don't yell about broadcasts sent via shell
            return;
        }
        final String action = intent.getAction();
        if (isProtectedBroadcast
                || Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
@@ -18033,11 +18038,7 @@ public class ActivityManagerService extends IActivityManager.Stub
            case Process.PHONE_UID:
            case Process.BLUETOOTH_UID:
            case Process.NFC_UID:
                if ((intent.getFlags() & Intent.FLAG_RECEIVER_FROM_SHELL) != 0) {
                    isCallerSystem = false;
                } else {
                isCallerSystem = true;
                }
                break;
            default:
                isCallerSystem = (callerApp != null) && callerApp.persistent;