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

Commit 3f5ce4c1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix inconsistent getPackageInfo() calls when parsing exceptions."

parents fefd62ca b157ef80
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1462,14 +1462,15 @@ public final class DefaultPermissionGrantPolicy {
                        outGrantExceptions.get(packageName);
                if (packageExceptions == null) {
                    // The package must be on the system image
                    if (!isSystemPackage(packageName)) {
                        Log.w(TAG, "Unknown package:" + packageName);
                    PackageInfo packageInfo = getSystemPackageInfo(packageName);
                    if (!isSystemPackage(packageInfo)) {
                        Log.w(TAG, "Unknown system package:" + packageName);
                        XmlUtils.skipCurrentTag(parser);
                        continue;
                    }

                    // The package must support runtime permissions
                    if (!doesPackageSupportRuntimePermissions(getSystemPackageInfo(packageName))) {
                    if (!doesPackageSupportRuntimePermissions(packageInfo)) {
                        Log.w(TAG, "Skipping non supporting runtime permissions package:"
                                + packageName);
                        XmlUtils.skipCurrentTag(parser);