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

Commit 4c1e8d0f authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Quietly pivot to default values.

Legacy writers would often omit certain attributes, which would
result in verbose errors being logged during later parsing.  Instead,
shift to simply accepting the default value without logging.

Bug: 176452293
Test: none
Change-Id: Id805ca4332f813942cf6eb75e6a3a6fcec85eaf2
parent d8a960ca
Loading
Loading
Loading
Loading
+1 −9
Original line number Original line Diff line number Diff line
@@ -167,15 +167,7 @@ public final class LegacyPermission {


    private static int readInt(@NonNull TypedXmlPullParser parser, @Nullable String namespace,
    private static int readInt(@NonNull TypedXmlPullParser parser, @Nullable String namespace,
            @NonNull String name, int defaultValue) {
            @NonNull String name, int defaultValue) {
        try {
        return parser.getAttributeInt(namespace, name, defaultValue);
            return parser.getAttributeInt(namespace, name);
        } catch (Exception ignored) {
            PackageManagerService.reportSettingsProblem(Log.WARN,
                    "Error in package manager settings: attribute " + name
                            + " has bad integer value at "
                            + parser.getPositionDescription());
            return defaultValue;
        }
    }
    }


    /**
    /**