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

Commit 223c8060 authored by LuK1337's avatar LuK1337
Browse files

Settings: appops: Drop GET_UNINSTALLED_PACKAGES from getApplicationInfo()

* Not sure why this flag was even there in the first place
  but removing it fixes an issue where app crashes due to
  ApplicationInfo.sourceDir being null.
* The easiest way to reproduce that issue is to remove
  /data/app/{} of any app listed in 'bootup' category
  then after a reboot Settings app will crash when trying
  to show said category.

Change-Id: I96e83a35b732b426a8e1a94604549172d2e9f03c
parent 4c094844
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -607,8 +607,7 @@ public class AppOpsState {
        if (appInfo == null) {
            try {
                appInfo = mPm.getApplicationInfo(packageName,
                        PackageManager.GET_DISABLED_COMPONENTS
                        | PackageManager.GET_UNINSTALLED_PACKAGES);
                        PackageManager.GET_DISABLED_COMPONENTS);
            } catch (PackageManager.NameNotFoundException e) {
                Log.w(TAG, "Unable to find info for package " + packageName);
                return null;