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

Commit c3c7d938 authored by Winson Chiu's avatar Winson Chiu Committed by Automerger Merge Worker
Browse files

Merge "Optimize ActiveServices targetSdkVersion fetch" into tm-dev am: 81fdbfc0

parents 48117b3a 81fdbfc0
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -6593,12 +6593,11 @@ public final class ActiveServices {
        }

        final int uidState = mAm.getUidStateLocked(callingUid);
        int callerTargetSdkVersion = INVALID_UID;
        int callerTargetSdkVersion = -1;
        try {
            ApplicationInfo ai = mAm.mContext.getPackageManager().getApplicationInfoAsUser(
                    callingPackage, PackageManager.MATCH_KNOWN_PACKAGES, userId);
            callerTargetSdkVersion = ai.targetSdkVersion;
        } catch (PackageManager.NameNotFoundException e) {
            callerTargetSdkVersion = mAm.mContext.getPackageManager()
                    .getTargetSdkVersion(callingPackage);
        } catch (PackageManager.NameNotFoundException ignored) {
        }
        final String debugInfo =
                "[callingPackage: " + callingPackage