am 92205a33: am 50e2d6c2: am ef6178a9: Merge "Add hasMatchedTetherApnSetting to telmgr API." into lmp-mr1-dev

* commit '92205a33655f8a4f487e8d85a9d6d151d0db21a1':
  Add hasMatchedTetherApnSetting to telmgr API.
This commit is contained in:
Junda Liu
2014-12-02 18:52:28 +00:00
committed by Android Git Automerger
3 changed files with 35 additions and 2 deletions

View File

@@ -3082,6 +3082,26 @@ public class TelephonyManager {
return setPreferredNetworkType(RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA);
}
/**
* 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.
*/

View File

@@ -656,6 +656,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.