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
This commit is contained in:
Jeff Sharkey
2021-01-25 12:55:47 -07:00
parent d8a960ca22
commit 4c1e8d0fc8

View File

@@ -167,15 +167,7 @@ public final class LegacyPermission {
private static int readInt(@NonNull TypedXmlPullParser parser, @Nullable String namespace,
@NonNull String name, int defaultValue) {
try {
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;
}
return parser.getAttributeInt(namespace, name, defaultValue);
}
/**