Merge "add setCdmaSubscription to telephonymanager."
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 124a8ec..0e5b0e6 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -2793,6 +2793,25 @@
}
/**
+ * Set the CDMA subscription source.
+ * Used for device supporting both NV and RUIM for CDMA.
+ *
+ * @param subscriptionType the subscription type, 0 for RUIM, 1 for NV.
+ * @return true on success; false on any failure.
+ * @hide
+ */
+ public boolean setCdmaSubscription(int subscriptionType) {
+ try {
+ return getITelephony().setCdmaSubscription(subscriptionType);
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "setCdmaSubscription RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "setCdmaSubscription NPE", ex);
+ }
+ return false;
+ }
+
+ /**
* Expose the rest of ITelephony to @SystemApi
*/
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index beee616..237e7f3 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -606,6 +606,15 @@
boolean setPreferredNetworkType(int networkType);
/**
+ * Set the CDMA subscription source.
+ * Used for device supporting both NV and RUIM for CDMA.
+ *
+ * @param subscriptionType the subscription type, 0 for RUIM, 1 for NV.
+ * @return true on success; false on any failure.
+ */
+ boolean setCdmaSubscription(int subscriptionType);
+
+ /**
* User enable/disable Mobile Data.
*
* @param enable true to turn on, else false