Merge "Make isDataCapable a public API" am: bdee4edb08 am: 1e83a9eaf9

Change-Id: If943a821eb8004b7a7e6782f3490c0d903b58a63
This commit is contained in:
Automerger Merge Worker
2020-03-02 19:44:31 +00:00
2 changed files with 10 additions and 3 deletions

View File

@@ -45918,6 +45918,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);

View File

@@ -11011,9 +11011,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;