Merge "Checking if package belongs to UID before registering broadcast receiver" into rvc-qpr-dev am: d630a52799
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20642500 Change-Id: Ida76be09ea3d0d8fadbd9e41778674b26c9c262d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3200,6 +3200,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);
|
||||
|
||||
Reference in New Issue
Block a user