diff options
| author | 2019-12-23 20:03:40 +0000 | |
|---|---|---|
| committer | 2019-12-23 20:03:40 +0000 | |
| commit | 3831174548696ddc819ae8463d9cb488d581873c (patch) | |
| tree | 3527a34880631f444d442eac40a3f736d69d038f | |
| parent | 888365c03dd132d0c058f190118c7577e5e96001 (diff) | |
| parent | c4aa6f6dcd53508aa5e07ef0ce63580fbe461aaa (diff) | |
Merge "Remove unused SystemProperties.set"
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 6cd75c65bdb0..12d8707bea5a 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -6419,75 +6419,6 @@ public class TelephonyManager { } /** - * Sets a per-phone telephony property with the value specified. - * - * @hide - */ - @UnsupportedAppUsage - public static void setTelephonyProperty(int phoneId, String property, String value) { - String propVal = ""; - String p[] = null; - String prop = SystemProperties.get(property); - - if (value == null) { - value = ""; - } - value.replace(',', ' '); - if (prop != null) { - p = prop.split(","); - } - - if (!SubscriptionManager.isValidPhoneId(phoneId)) { - Rlog.d(TAG, "setTelephonyProperty: invalid phoneId=" + phoneId + - " property=" + property + " value: " + value + " prop=" + prop); - return; - } - - for (int i = 0; i < phoneId; i++) { - String str = ""; - if ((p != null) && (i < p.length)) { - str = p[i]; - } - propVal = propVal + str + ","; - } - - propVal = propVal + value; - if (p != null) { - for (int i = phoneId + 1; i < p.length; i++) { - propVal = propVal + "," + p[i]; - } - } - - 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; - } - - SystemProperties.set(property, propVal); - } - - /** - * Sets a global telephony property with the value specified. - * - * @hide - */ - public static void setTelephonyProperty(String property, String value) { - if (value == null) { - value = ""; - } - Rlog.d(TAG, "setTelephonyProperty: success" + " property=" + - property + " value: " + value); - SystemProperties.set(property, value); - } - - /** * Inserts or updates a list property. Expands the list if its length is not enough. */ private static <T> List<T> updateTelephonyProperty(List<T> prop, int phoneId, T value) { |