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

Commit 99aae825 authored by Mayank Dandwani's avatar Mayank Dandwani Committed by Android Build Coastguard Worker
Browse files

Allow core uids to register receiver as "android".

System components can run in any processes belonging to
core uids. If one of such components end up registering
a receiver, it will get registered as "android".

Bug: 387930030
Bug: 310632322
Test: builds
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a49d3c13aac1aa7d258665e14d8e5cc2ff7638df)
Merged-In: I843fbead461062ae3369cc0f21d606fa1cf02ceb
Change-Id: I843fbead461062ae3369cc0f21d606fa1cf02ceb
parent ed39b7c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14687,7 +14687,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                Slog.w(TAG, "registerReceiverWithFeature: no app for " + caller);
                return null;
            }
            if (callerApp.info.uid != SYSTEM_UID
            if (!UserHandle.isCore(callerApp.info.uid)
                    && !callerApp.getPkgList().containsKey(callerPackage)) {
                throw new SecurityException("Given caller package " + callerPackage
                        + " is not running in process " + callerApp);