diff options
| author | 2020-01-17 12:58:41 -0800 | |
|---|---|---|
| committer | 2020-01-17 12:58:41 -0800 | |
| commit | b5fe6f5f1554480293043fc325de58e4ef70f70b (patch) | |
| tree | 7a4974cde3c39c1fec7da4c1e2da9641c3c5ece8 | |
| parent | 55e4896d52f4908ff0221d425d0cc5dff4319da2 (diff) | |
Make isDataCapable a public API
This is part of the larger network attributes change
Bug: 147342211
Bug: 146206136
Test: make
Change-Id: I4f5dd3440e403b96112bf2e848bffb5aac299732
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/api/current.txt b/api/current.txt index 081201967075..21aca0ecd872 100644 --- a/api/current.txt +++ b/api/current.txt @@ -46432,6 +46432,7 @@ package android.telephony { method @Deprecated public String iccTransmitApduBasicChannel(int, int, int, int, int, String); method @Deprecated public String iccTransmitApduLogicalChannel(int, int, int, int, int, int, String); method public boolean isConcurrentVoiceAndDataSupported(); + method public boolean isDataCapable(); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean isDataEnabled(); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isDataRoamingEnabled(); method public boolean isEmergencyNumber(@NonNull String); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index c4bcc170ffc3..6f82ae10f4a0 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -10980,9 +10980,15 @@ public class TelephonyManager { } /** - * Checks if FEATURE_TELEPHONY_DATA is enabled. - * - * @hide + * @return true if the current device is "data capable" over a radio on the device. + * <p> + * "Data capable" means that this device supports packet-switched + * data connections over the telephony network. + * <p> + * Note: the meaning of this flag is subtly different from the + * PackageManager.FEATURE_TELEPHONY system feature, which is available + * on any device with a telephony radio, even if the device is + * voice-only. */ public boolean isDataCapable() { if (mContext == null) return true; |