blob: 18c5098184ff5f36223e1821d03972cb10706845 [file] [log] [blame]
Jackeagle0cc335a2018-10-19 00:06:49 -04001From 76ad65fa9d4689eed28b24b9ba55059389a6cf96 Mon Sep 17 00:00:00 2001
Jon Westa34208a2018-08-22 10:49:04 -04002From: jhenrique09 <jhenrique09.mcz@hotmail.com>
3Date: Sat, 11 Aug 2018 13:40:00 -0400
Jackeagle0cc335a2018-10-19 00:06:49 -04004Subject: [PATCH 03/26] Revert "Revert "Remove getIntWithSubId in
5 TelephonyManager.""
Jon Westa34208a2018-08-22 10:49:04 -04006
7This reverts commit e788decb1b366a9df9683d86314ea4cf22a10d74.
8---
Jackeagle0cc335a2018-10-19 00:06:49 -04009 .../java/android/telephony/TelephonyManager.java | 39 ----------------------
Jon Westa34208a2018-08-22 10:49:04 -040010 1 file changed, 39 deletions(-)
11
12diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
Jackeagle0cc335a2018-10-19 00:06:49 -040013index 3ecb6bb..b916a79 100644
Jon Westa34208a2018-08-22 10:49:04 -040014--- a/telephony/java/android/telephony/TelephonyManager.java
15+++ b/telephony/java/android/telephony/TelephonyManager.java
Jackeagle0cc335a2018-10-19 00:06:49 -040016@@ -6633,45 +6633,6 @@ public class TelephonyManager {
Jon Westa34208a2018-08-22 10:49:04 -040017 }
18
Jackeagle0cc335a2018-10-19 00:06:49 -040019 /**
Jon Westa34208a2018-08-22 10:49:04 -040020- * This function retrieves value for setting "name+subId", and if that is not found
21- * retrieves value for setting "name", and if that is not found throws
22- * SettingNotFoundException
23- *
24- * @hide
25- */
26- public static int getIntWithSubId(ContentResolver cr, String name, int subId)
27- throws SettingNotFoundException {
28- try {
29- return Settings.Global.getInt(cr, name + subId);
30- } catch (SettingNotFoundException e) {
31- try {
32- int val = Settings.Global.getInt(cr, name);
33- Settings.Global.putInt(cr, name + subId, val);
34-
35- /* We are now moving from 'setting' to 'setting+subId', and using the value stored
36- * for 'setting' as default. Reset the default (since it may have a user set
37- * value). */
38- int default_val = val;
39- if (name.equals(Settings.Global.MOBILE_DATA)) {
40- default_val = "true".equalsIgnoreCase(
41- SystemProperties.get("ro.com.android.mobiledata", "true")) ? 1 : 0;
42- } else if (name.equals(Settings.Global.DATA_ROAMING)) {
43- default_val = "true".equalsIgnoreCase(
44- SystemProperties.get("ro.com.android.dataroaming", "false")) ? 1 : 0;
45- }
46-
47- if (default_val != val) {
48- Settings.Global.putInt(cr, name, default_val);
49- }
50-
51- return val;
52- } catch (SettingNotFoundException exc) {
53- throw new SettingNotFoundException(name);
54- }
55- }
56- }
57-
Jackeagle0cc335a2018-10-19 00:06:49 -040058- /**
Jon Westa34208a2018-08-22 10:49:04 -040059 * Returns the IMS Registration Status for a particular Subscription ID.
60 *
Jackeagle0cc335a2018-10-19 00:06:49 -040061 * @param subId Subscription ID
Jon Westa34208a2018-08-22 10:49:04 -040062--
Jackeagle0cc335a2018-10-19 00:06:49 -0400632.7.4
Jon Westa34208a2018-08-22 10:49:04 -040064