diff options
| author | Tom Cherry <tomcherry@google.com> | 2017-10-18 18:48:55 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2017-10-18 18:48:55 +0000 |
| commit | 918a29c88d7da8891f734668473eda9f617021b3 (patch) | |
| tree | 24d09af8eff4d7a6ead181faa4c48b9982e0a137 /core/java | |
| parent | 98fc198f1fe4236f8b9fd159636c4386ead0dc35 (diff) | |
| parent | 9fba6c2fe1187ecdb4dbb309fcccd5e89921918a (diff) | |
Merge "Allow ro. properties to have arbitrary lengths" am: 3851f132d1
am: 9fba6c2fe1
Change-Id: I17743afca87569e5ef6e17572aec0e8e8e535847
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/SystemProperties.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/os/SystemProperties.java b/core/java/android/os/SystemProperties.java index 84111fbf7f93..4f6d322ba871 100644 --- a/core/java/android/os/SystemProperties.java +++ b/core/java/android/os/SystemProperties.java @@ -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); } |
