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

Commit 28f7b928 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

ModuleInfoProvider: Fix bogus call to getPackageInfo.

The method expects an Android user id and not a linux UID. Passing
the latter causes the lookup to return null because the UID is not known
to the user manage.

Test: Boots with AOSP change Idd87f95d2cd0c5d34009e7b55919a93dc11e2747.
Bug: 121187951

Change-Id: I4542563afdc7d6e62743e8143c2ac6faea996446
parent db920aba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Slog;
@@ -91,7 +91,7 @@ public class ModuleInfoProvider {
        final PackageInfo pi;
        try {
            pi = mPackageManager.getPackageInfo(packageName,
                PackageManager.GET_META_DATA, Process.SYSTEM_UID);
                PackageManager.GET_META_DATA, UserHandle.USER_SYSTEM);

            Context packageContext = mContext.createPackageContext(packageName, 0);
            packageResources = packageContext.getResources();