summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorJunda Liu <junda@google.com>2014-10-28 13:52:51 -0700
committerJunda Liu <junda@google.com>2014-11-21 16:21:30 -0800
commit38531581fc19f9172fabe56047b326e5dab88625 (patch)
tree6fb9f7a442aebcc4c91407fb3269efa3c80342d4 /telephony/java
parente9f7e65c4090d7ea97bc065f6fefd58c2fcebd47 (diff)
downloadframeworks_base-38531581fc19f9172fabe56047b326e5dab88625.zip
frameworks_base-38531581fc19f9172fabe56047b326e5dab88625.tar.gz
frameworks_base-38531581fc19f9172fabe56047b326e5dab88625.tar.bz2
Add hasMatchedTetherApnSetting to telmgr API.
Bug: b/18158411 Change-Id: Id1285b79194ad21fb728fd18fb09026e51354656
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java20
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl9
2 files changed, 29 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index f2d859f..ac311cc 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3083,6 +3083,26 @@ public class TelephonyManager {
}
/**
+ * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning
+ * SystemProperty, and config_tether_apndata to decide whether DUN APN is required for
+ * tethering.
+ *
+ * @return 0: Not required. 1: required. 2: Not set.
+ * @hide
+ */
+ public int getTetherApnRequired() {
+ try {
+ return getITelephony().getTetherApnRequired();
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "hasMatchedTetherApnSetting RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "hasMatchedTetherApnSetting NPE", ex);
+ }
+ return 2;
+ }
+
+
+ /**
* Values used to return status for hasCarrierPrivileges call.
*/
public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1;
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index cbfa9f6..b5ecb1c 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -657,6 +657,15 @@ interface ITelephony {
int getPreferredNetworkType();
/**
+ * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning
+ * SystemProperty, and config_tether_apndata to decide whether DUN APN is required for
+ * tethering.
+ *
+ * @return 0: Not required. 1: required. 2: Not set.
+ */
+ int getTetherApnRequired();
+
+ /**
* Set the preferred network type.
* Used for device configuration by some CDMA operators.
*