Merge "Optimize ActiveServices targetSdkVersion fetch" into tm-dev
This commit is contained in:
@@ -6593,12 +6593,11 @@ public final class ActiveServices {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int uidState = mAm.getUidStateLocked(callingUid);
|
final int uidState = mAm.getUidStateLocked(callingUid);
|
||||||
int callerTargetSdkVersion = INVALID_UID;
|
int callerTargetSdkVersion = -1;
|
||||||
try {
|
try {
|
||||||
ApplicationInfo ai = mAm.mContext.getPackageManager().getApplicationInfoAsUser(
|
callerTargetSdkVersion = mAm.mContext.getPackageManager()
|
||||||
callingPackage, PackageManager.MATCH_KNOWN_PACKAGES, userId);
|
.getTargetSdkVersion(callingPackage);
|
||||||
callerTargetSdkVersion = ai.targetSdkVersion;
|
} catch (PackageManager.NameNotFoundException ignored) {
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
|
||||||
}
|
}
|
||||||
final String debugInfo =
|
final String debugInfo =
|
||||||
"[callingPackage: " + callingPackage
|
"[callingPackage: " + callingPackage
|
||||||
|
|||||||
Reference in New Issue
Block a user