| From 76ad65fa9d4689eed28b24b9ba55059389a6cf96 Mon Sep 17 00:00:00 2001 |
| From: jhenrique09 <jhenrique09.mcz@hotmail.com> |
| Date: Sat, 11 Aug 2018 13:40:00 -0400 |
| Subject: [PATCH 03/26] Revert "Revert "Remove getIntWithSubId in |
| TelephonyManager."" |
| |
| This reverts commit e788decb1b366a9df9683d86314ea4cf22a10d74. |
| --- |
| .../java/android/telephony/TelephonyManager.java | 39 ---------------------- |
| 1 file changed, 39 deletions(-) |
| |
| diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java |
| index 3ecb6bb..b916a79 100644 |
| --- a/telephony/java/android/telephony/TelephonyManager.java |
| +++ b/telephony/java/android/telephony/TelephonyManager.java |
| @@ -6633,45 +6633,6 @@ public class TelephonyManager { |
| } |
| |
| /** |
| - * This function retrieves value for setting "name+subId", and if that is not found |
| - * retrieves value for setting "name", and if that is not found throws |
| - * SettingNotFoundException |
| - * |
| - * @hide |
| - */ |
| - public static int getIntWithSubId(ContentResolver cr, String name, int subId) |
| - throws SettingNotFoundException { |
| - try { |
| - return Settings.Global.getInt(cr, name + subId); |
| - } catch (SettingNotFoundException e) { |
| - try { |
| - int val = Settings.Global.getInt(cr, name); |
| - Settings.Global.putInt(cr, name + subId, val); |
| - |
| - /* We are now moving from 'setting' to 'setting+subId', and using the value stored |
| - * for 'setting' as default. Reset the default (since it may have a user set |
| - * value). */ |
| - int default_val = val; |
| - if (name.equals(Settings.Global.MOBILE_DATA)) { |
| - default_val = "true".equalsIgnoreCase( |
| - SystemProperties.get("ro.com.android.mobiledata", "true")) ? 1 : 0; |
| - } else if (name.equals(Settings.Global.DATA_ROAMING)) { |
| - default_val = "true".equalsIgnoreCase( |
| - SystemProperties.get("ro.com.android.dataroaming", "false")) ? 1 : 0; |
| - } |
| - |
| - if (default_val != val) { |
| - Settings.Global.putInt(cr, name, default_val); |
| - } |
| - |
| - return val; |
| - } catch (SettingNotFoundException exc) { |
| - throw new SettingNotFoundException(name); |
| - } |
| - } |
| - } |
| - |
| - /** |
| * Returns the IMS Registration Status for a particular Subscription ID. |
| * |
| * @param subId Subscription ID |
| -- |
| 2.7.4 |
| |