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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user