summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorJunda Liu <junda@google.com>2014-08-14 22:14:26 -0700
committerJunda Liu <junda@google.com>2014-08-14 22:21:12 -0700
commit2b2469b07d6ea9410bdb8d1234aa2320b02bdaa9 (patch)
treea5b17353f934fcf8bc104e85f6ca22753a221b38 /telephony
parentd4eb10a88d5c2587490d13a87550bb4b9afd9a9b (diff)
downloadframeworks_base-2b2469b07d6ea9410bdb8d1234aa2320b02bdaa9.zip
frameworks_base-2b2469b07d6ea9410bdb8d1234aa2320b02bdaa9.tar.gz
frameworks_base-2b2469b07d6ea9410bdb8d1234aa2320b02bdaa9.tar.bz2
Add getCdmaMdn and getCdmaMin as system api to telmgr.
Bug: b/16966140 Change-Id: I36d8f850eca7c392f7ed5186254ef9862d4177f7
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java36
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl12
2 files changed, 48 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index c50110a..b133a3c 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3025,6 +3025,42 @@ public class TelephonyManager {
/** @hide */
@SystemApi
+ public String getCdmaMdn() {
+ return getCdmaMdn(getDefaultSubscription());
+ }
+
+ /** @hide */
+ @SystemApi
+ public String getCdmaMdn(long subId) {
+ try {
+ return getITelephony().getCdmaMdn(subId);
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ return null;
+ }
+ }
+
+ /** @hide */
+ @SystemApi
+ public String getCdmaMin() {
+ return getCdmaMin(getDefaultSubscription());
+ }
+
+ /** @hide */
+ @SystemApi
+ public String getCdmaMin(long subId) {
+ try {
+ return getITelephony().getCdmaMin(subId);
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ return null;
+ }
+ }
+
+ /** @hide */
+ @SystemApi
public int checkCarrierPrivilegesForPackage(String pkgname) {
try {
return getITelephony().checkCarrierPrivilegesForPackage(pkgname);
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index d256f9d..22c09f0 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -677,6 +677,18 @@ interface ITelephony {
void setImsRegistrationState(boolean registered);
/**
+ * Return MDN string for CDMA phone.
+ * @param subId user preferred subId.
+ */
+ String getCdmaMdn(long subId);
+
+ /**
+ * Return MIN string for CDMA phone.
+ * @param subId user preferred subId.
+ */
+ String getCdmaMin(long subId);
+
+ /**
* Has the calling application been granted special privileges by the carrier.
*
* If any of the packages in the calling UID has carrier privileges, the