Merge "Checking if package belongs to UID before registering broadcast receiver" into rvc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d630a52799
@@ -2517,6 +2517,11 @@ public final class ActiveServices {
|
|||||||
throw new SecurityException("BIND_EXTERNAL_SERVICE failed, "
|
throw new SecurityException("BIND_EXTERNAL_SERVICE failed, "
|
||||||
+ className + " is not an isolatedProcess");
|
+ 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.
|
// Run the service under the calling package's application.
|
||||||
ApplicationInfo aInfo = AppGlobals.getPackageManager().getApplicationInfo(
|
ApplicationInfo aInfo = AppGlobals.getPackageManager().getApplicationInfo(
|
||||||
callingPackage, ActivityManagerService.STOCK_PM_FLAGS, userId);
|
callingPackage, ActivityManagerService.STOCK_PM_FLAGS, userId);
|
||||||
|
|||||||
Reference in New Issue
Block a user