diff options
author | Sanket Padawe <sanketpadawe@google.com> | 2015-01-17 22:15:54 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-17 22:15:56 +0000 |
commit | d2dd69ae8d81defc5f2286690b3dd246d4118fcc (patch) | |
tree | 8ec07cb19e125e52b54a6f8059ccb30a66ee858a /telephony/java | |
parent | c68ab86a8cef8b8ca4588e7eb482c5acf9821aa9 (diff) | |
parent | 0b7f5e81ba06f694df8c8cccaea9e009e3200b4c (diff) | |
download | frameworks_base-d2dd69ae8d81defc5f2286690b3dd246d4118fcc.zip frameworks_base-d2dd69ae8d81defc5f2286690b3dd246d4118fcc.tar.gz frameworks_base-d2dd69ae8d81defc5f2286690b3dd246d4118fcc.tar.bz2 |
Merge "Modify getDeviceId() to get device id independent of Subscription." into lmp-mr1-dev
Diffstat (limited to 'telephony/java')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 6 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index dca1f82..caa4fd0 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(); } |