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

Commit 93c036bb 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:63fc17abcab6abae7411d63e15194873c6d99122)
Merged-In: I3fc4c9097602147e44ef77ad80defd33d8f5a2fc
Change-Id: I3fc4c9097602147e44ef77ad80defd33d8f5a2fc
parent ee0d85dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13810,7 +13810,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);