summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2017-10-18 19:44:54 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-10-18 19:44:54 +0000
commit3fb7276115becf9818f1d2881fa41bab99bebef2 (patch)
tree4364aa3317afe4fe9e0e018f70dd0e82caa1bb91 /core/java/android
parent36276fd6ee5db8481e3d14faaf5772f94fd7ebfe (diff)
parent918a29c88d7da8891f734668473eda9f617021b3 (diff)
Merge "Allow ro. properties to have arbitrary lengths" am: 3851f132d1 am: 9fba6c2fe1
am: 918a29c88d Change-Id: I29e0ca8d91d29431b498788b548fd48e85d6669b
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/SystemProperties.java2
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);
}