diff options
author | Junda Liu <junda@google.com> | 2014-07-08 19:20:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-02 18:55:10 +0000 |
commit | 6792a233eb70c660370093b591d1e94f68b0fc8a (patch) | |
tree | 0e6df75234368fe21b2633908b9c1de682e0fa93 | |
parent | 66c6747179576a7477ff2c22f737f8e24c762b81 (diff) | |
parent | 1365703d4964466472904dc84117a0946d9e1a44 (diff) | |
download | frameworks_base-6792a233eb70c660370093b591d1e94f68b0fc8a.zip frameworks_base-6792a233eb70c660370093b591d1e94f68b0fc8a.tar.gz frameworks_base-6792a233eb70c660370093b591d1e94f68b0fc8a.tar.bz2 |
Merge "Add calculatePreferredNetworkType to TelephonyManager."
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 19 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 4930255..e4885a1 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -2756,6 +2756,25 @@ public class TelephonyManager { } /** + * Get the calculated preferred network type. + * Used for debugging incorrect network type. + * + * @return the preferred network type, defined in RILConstants.java or -1 if + * none available. + * @hide + */ + public int getCalculatedPreferredNetworkType() { + try { + return getITelephony().getCalculatedPreferredNetworkType(); + } catch (RemoteException ex) { + Rlog.e(TAG, "getCalculatedPreferredNetworkType RemoteException", ex); + } catch (NullPointerException ex) { + Rlog.e(TAG, "getCalculatedPreferredNetworkType NPE", ex); + } + return -1; + } + + /** * Get the preferred network type. * Used for device configuration by some CDMA operators. * diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 5b6db4d..7bf3b3f 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -584,6 +584,14 @@ interface ITelephony { boolean nvResetConfig(int resetType); /* + * Get the calculated preferred network type. + * Used for device configuration by some CDMA operators. + * + * @return the calculated preferred network type, defined in RILConstants.java. + */ + int getCalculatedPreferredNetworkType(); + + /* * Get the preferred network type. * Used for device configuration by some CDMA operators. * |