summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java19
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl8
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.
*