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

Commit b086727b authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Fix confusion of userId vs. uid

There function was trying to get the UserHandle of a userId,
but was instead treating the userId as a uid, and thereby
getting the wrong UserHandle.

Bug: 162543841
Test: com.android.frameworks.telephonytests (i.e. FrameworksTelephonyTests)
Change-Id: I2ade8a45e195a1d14535605233868ff7aebc0618
parent 75aa74bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1441,7 +1441,7 @@ public abstract class SMSDispatcher extends Handler {
        PackageManager pm = mContext.getPackageManager();
        try {
            ApplicationInfo appInfo = pm.getApplicationInfoAsUser(appPackage, 0,
                UserHandle.getUserHandleForUid(userId));
                    UserHandle.of(userId));
            return appInfo.loadSafeLabel(pm);
        } catch (PackageManager.NameNotFoundException e) {
            Rlog.e(TAG, "PackageManager Name Not Found for package " + appPackage);
+1 −1
Original line number Diff line number Diff line
@@ -1542,7 +1542,7 @@ public class ImsResolver implements ImsServiceController.ImsServiceControllerCal
        for (ResolveInfo entry : packageManager.queryIntentServicesAsUser(
                serviceIntent,
                PackageManager.GET_META_DATA,
                UserHandle.getUserHandleForUid(UserHandle.myUserId()))) {
                UserHandle.of(UserHandle.myUserId()))) {
            ServiceInfo serviceInfo = entry.serviceInfo;

            if (serviceInfo != null) {