summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-03-06 10:08:06 -0800
committerEvan Charlton <evanc@google.com>2014-03-06 10:08:06 -0800
commit9bbb37116d2c5b597f9b5e3094ff328971e03c0b (patch)
treeeaf4a12bc84f8dcfed58d515ec10b6daf61a699a /telephony/java
parenta693e2ba5954be17190df9f359aa5ecb4cfc4126 (diff)
parent322f7d6e4abf8d0098ae322fe328b2510383baf5 (diff)
downloadframeworks_base-9bbb37116d2c5b597f9b5e3094ff328971e03c0b.zip
frameworks_base-9bbb37116d2c5b597f9b5e3094ff328971e03c0b.tar.gz
frameworks_base-9bbb37116d2c5b597f9b5e3094ff328971e03c0b.tar.bz2
resolved conflicts for merge 322f7d6e to master-nova
Change-Id: I31de6084253ce21f50224582f82b7f7e630ef34e
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java37
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl17
2 files changed, 54 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 53c6a2e..f621fa4 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1931,4 +1931,41 @@ public class TelephonyManager {
} catch (RemoteException ex) {
}
}
+
+ /**
+ * Get the preferred network type.
+ * Used for device configuration by some CDMA operators.
+ *
+ * @return the preferred network type, defined in RILConstants.java.
+ * @hide
+ */
+ public int getPreferredNetworkType() {
+ try {
+ return getITelephony().getPreferredNetworkType();
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "getPreferredNetworkType RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "getPreferredNetworkType NPE", ex);
+ }
+ return -1;
+ }
+
+ /**
+ * Set the preferred network type.
+ * Used for device configuration by some CDMA operators.
+ *
+ * @param networkType the preferred network type, defined in RILConstants.java.
+ * @return true on success; false on any failure.
+ * @hide
+ */
+ public boolean setPreferredNetworkType(int networkType) {
+ try {
+ return getITelephony().setPreferredNetworkType(networkType);
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "setPreferredNetworkType RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "setPreferredNetworkType NPE", ex);
+ }
+ return false;
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index adc923b..4c0f259 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -441,4 +441,21 @@ interface ITelephony {
* @see android.telephony.TelephonyManager.WifiCallingChoices
*/
void setWhenToMakeWifiCalls(int state);
+
+ /*
+ * Get the preferred network type.
+ * Used for device configuration by some CDMA operators.
+ *
+ * @return the preferred network type, defined in RILConstants.java.
+ */
+ int getPreferredNetworkType();
+
+ /**
+ * Set the preferred network type.
+ * Used for device configuration by some CDMA operators.
+ *
+ * @param networkType the preferred network type, defined in RILConstants.java.
+ * @return true on success; false on any failure.
+ */
+ boolean setPreferredNetworkType(int networkType);
}