summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 5ec6950..1f63a22 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -4692,6 +4692,12 @@ public class TelephonyManager {
if (SubscriptionManager.isValidPhoneId(phoneId)) {
String prop = TelephonyProperties.PROPERTY_BASEBAND_VERSION +
((phoneId == 0) ? "" : Integer.toString(phoneId));
+ if (version != null && version.length() > SystemProperties.PROP_VALUE_MAX) {
+ Log.e(TAG, "setBasebandVersionForPhone(): version string '" + version +
+ "' too long! (" + version.length() +
+ " > " + SystemProperties.PROP_VALUE_MAX + ")");
+ version = version.substring(0, SystemProperties.PROP_VALUE_MAX);
+ }
SystemProperties.set(prop, version);
}
}