summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorRambo Wang <rambowang@google.com>2021-03-15 21:15:48 -0700
committerRambo Wang <rambowang@google.com>2021-03-22 12:24:19 -0700
commit6a7df3f4e8dbbaa6835fe82a44d1d3def7670d71 (patch)
treec025ccfd4f078d5cc92ad52b2b219e1f9d305bf4 /core/java
parent805b39b2d9af2a149857a8c44f34238a1d166375 (diff)
Expose ServiceState#getDataNetworkType in telephony provider
Data network type is key information to make the switching decision. Exporting to telephony provider can let application get the information without location permission. Bug: 182601774 Test: atest com.android.phone.ServiceStateProviderTest Change-Id: I9753eee2619baf6b1627835624444c0e4f0cd410
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/provider/Telephony.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index 753abea2cfe2..9b65a7ce0509 100644
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -4572,6 +4572,13 @@ public final class Telephony {
* This is the same as {@link ServiceState#getIsManualSelection()}.
*/
public static final String IS_MANUAL_NETWORK_SELECTION = "is_manual_network_selection";
+
+ /**
+ * The current data network type.
+ * <p>
+ * This is the same as {@link TelephonyManager#getDataNetworkType()}.
+ */
+ public static final String DATA_NETWORK_TYPE = "data_network_type";
}
/**