summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2015-01-17 22:37:03 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-17 22:37:03 +0000
commitc0fa70ee195e25eb470223d2a1de855e455d21c5 (patch)
tree57ce1139df1233154f885077e7884306091795ea /telephony
parentbd74a7022cc548c447ecb368391d2da464dd2b1b (diff)
parent60b41e6aa7a93bf90cb1b7715a2429dbe7c975fe (diff)
downloadframeworks_base-c0fa70ee195e25eb470223d2a1de855e455d21c5.zip
frameworks_base-c0fa70ee195e25eb470223d2a1de855e455d21c5.tar.gz
frameworks_base-c0fa70ee195e25eb470223d2a1de855e455d21c5.tar.bz2
am 60b41e6a: am 543348eb: am d2dd69ae: Merge "Modify getDeviceId() to get device id independent of Subscription." into lmp-mr1-dev
* commit '60b41e6aa7a93bf90cb1b7715a2429dbe7c975fe': Modify getDeviceId() to get device id independent of Subscription.
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java6
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl10
2 files changed, 15 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 03cc7d0..41f0bdd 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -620,7 +620,11 @@ public class TelephonyManager {
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getDeviceId() {
- return getDeviceId(getDefaultSim());
+ try {
+ return getITelephony().getDeviceId();
+ } catch (RemoteException ex) {
+ return null;
+ }
}
/**
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index d6e40ae9..bf3ee09 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -865,8 +865,18 @@ interface ITelephony {
* @return {@code True} if the user has enabled video calling, {@code false} otherwise.
*/
boolean isVideoCallingEnabled();
+
/**
* Get IMS Registration Status
*/
boolean isImsRegistered();
+
+ /**
+ * Returns the unique device ID of phone, for example, the IMEI for
+ * GSM and the MEID for CDMA phones. Return null if device ID is not available.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ */
+ String getDeviceId();
}