Merge "Allow ro. properties to have arbitrary lengths" am: 3851f132d1

am: 9fba6c2fe1

Change-Id: I17743afca87569e5ef6e17572aec0e8e8e535847
This commit is contained in:
Tom Cherry
2017-10-18 18:48:55 +00:00
committed by android-build-merger

View File

@@ -157,7 +157,7 @@ public class SystemProperties {
* @throws IllegalArgumentException if the {@code val} exceeds 91 characters
*/
public static void set(@NonNull String key, @Nullable String val) {
if (val != null && val.length() > PROP_VALUE_MAX) {
if (val != null && !val.startsWith("ro.") && val.length() > PROP_VALUE_MAX) {
throw new IllegalArgumentException("value of system property '" + key
+ "' is longer than " + PROP_VALUE_MAX + " characters: " + val);
}