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

Commit 4b5f423c authored by Chen Xu's avatar Chen Xu
Browse files

use packageManager @SystemAPI

Bug: 137202333
Test: Build
Change-Id: I1c0cb7840cb7d68fd720723eec96aa51aefc1df8
parent 5047e888
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ public final class SmsApplication {
                ApplicationInfo appInfo;
                try {
                    appInfo = pm.getApplicationInfoAsUser(mPackageName, 0,
                            UserHandle.getUserId(mUid));
                            UserHandle.getUserHandleForUid(mUid));
                } catch (NameNotFoundException e) {
                    return null;
                }
@@ -300,7 +300,7 @@ public final class SmsApplication {
                Uri.fromParts(SCHEME_SMSTO, "", null));
        List<ResolveInfo> respondServices = packageManager.queryIntentServicesAsUser(intent,
                PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
                userId);
                UserHandle.getUserHandleForUid(userId));
        for (ResolveInfo resolveInfo : respondServices) {
            final ServiceInfo serviceInfo = resolveInfo.serviceInfo;
            if (serviceInfo == null) {
+1 −1
Original line number Diff line number Diff line
@@ -367,7 +367,7 @@ public final class TelephonyPermissions {
        ApplicationInfo callingPackageInfo = null;
        try {
            callingPackageInfo = context.getPackageManager().getApplicationInfoAsUser(
                    callingPackage, 0, UserHandle.getUserId(uid));
                    callingPackage, 0, UserHandle.getUserHandleForUid(uid));
            if (callingPackageInfo != null) {
                if (callingPackageInfo.isSystemApp()) {
                    isPreinstalled = true;