Merge "[SettingsProvider] fix font size scale validator" into rvc-qpr-dev

This commit is contained in:
Songchun Fan
2020-12-09 00:00:24 +00:00
committed by Android (Google) Code Review

View File

@@ -89,15 +89,7 @@ public class SystemSettingsValidators {
return value == null || value.length() < MAX_LENGTH;
}
});
VALIDATORS.put(
System.FONT_SCALE,
value -> {
try {
return Float.parseFloat(value) >= 0;
} catch (NumberFormatException | NullPointerException e) {
return false;
}
});
VALIDATORS.put(System.FONT_SCALE, new InclusiveFloatRangeValidator(0.85f, 1.3f));
VALIDATORS.put(System.DIM_SCREEN, BOOLEAN_VALIDATOR);
VALIDATORS.put(
System.DISPLAY_COLOR_MODE,