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

Commit 2591d9de authored by Kunal Malhotra's avatar Kunal Malhotra Committed by Android (Google) Code Review
Browse files

Merge "Checking if package belongs to UID before registering broadcast receiver"

parents 56445534 790a8d0d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3838,6 +3838,11 @@ public final class ActiveServices {
                            throw new SecurityException("BIND_EXTERNAL_SERVICE failed, "
                                    + className + " is not an isolatedProcess");
                        }
                        if (AppGlobals.getPackageManager().getPackageUid(callingPackage,
                                0, userId) != callingUid) {
                            throw new SecurityException("BIND_EXTERNAL_SERVICE failed, "
                                    + "calling package not owned by calling UID ");
                        }
                        // Run the service under the calling package's application.
                        ApplicationInfo aInfo = AppGlobals.getPackageManager().getApplicationInfo(
                                callingPackage, ActivityManagerService.STOCK_PM_FLAGS, userId);