diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index f72321c5d9ac0..39edaf02d768e 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -3869,8 +3869,8 @@ public final class ActiveServices { throw new SecurityException("BIND_EXTERNAL_SERVICE failed, " + className + " is not an isolatedProcess"); } - if (AppGlobals.getPackageManager().getPackageUid(callingPackage, - 0, userId) != callingUid) { + if (!mAm.getPackageManagerInternal().isSameApp(callingPackage, callingUid, + userId)) { throw new SecurityException("BIND_EXTERNAL_SERVICE failed, " + "calling package not owned by calling UID "); }