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

Commit e69eab3b authored by Mayank Dandwani's avatar Mayank Dandwani Committed by Evelyn Torres
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:252bdb73a318ceccc7391106271b7f233f165810)
Merged-In: Ia577940331af5a79804aa6afcd1773e207a58558
Change-Id: Ia577940331af5a79804aa6afcd1773e207a58558
parent c7de9d28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12483,7 +12483,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                            + " (pid=" + Binder.getCallingPid()
                            + ") when registering receiver " + receiver);
                }
                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);