Merge "Fix property setting with failure" am: da9de2d7fa

am: 58be59a233

Change-Id: Ia3994b3595d6ccd945dc9ca45f7fc4c46c12908a
This commit is contained in:
Youming Ye
2018-12-13 13:53:07 -08:00
committed by android-build-merger

View File

@@ -5604,7 +5604,7 @@ public class TelephonyManager {
if (value == null) {
value = "";
}
value.replace(',', ' ');
if (prop != null) {
p = prop.split(",");
}
@@ -5630,7 +5630,13 @@ public class TelephonyManager {
}
}
if (propVal.length() > SystemProperties.PROP_VALUE_MAX) {
int propValLen = propVal.length();
try {
propValLen = propVal.getBytes("utf-8").length;
} catch (java.io.UnsupportedEncodingException e) {
Rlog.d(TAG, "setTelephonyProperty: utf-8 not supported");
}
if (propValLen > SystemProperties.PROP_VALUE_MAX) {
Rlog.d(TAG, "setTelephonyProperty: property too long phoneId=" + phoneId +
" property=" + property + " value: " + value + " propVal=" + propVal);
return;