summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorJohn Wang <johnwang@google.com>2011-06-07 15:49:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-07 15:49:34 -0700
commitfc94d45fc209dbcfdf7f57e0c04c581e1e51988b (patch)
treea2787aa64c969926803ae941fb24c5790ec51cc9 /telephony
parentee3de4a950a188c6a4d5fb732242249af4807837 (diff)
parente19736f0520689747b9e703a40b5f574bd9a7fce (diff)
downloadframeworks_base-fc94d45fc209dbcfdf7f57e0c04c581e1e51988b.zip
frameworks_base-fc94d45fc209dbcfdf7f57e0c04c581e1e51988b.tar.gz
frameworks_base-fc94d45fc209dbcfdf7f57e0c04c581e1e51988b.tar.bz2
Merge "Make getDeviceId return null for Non-phone device." into honeycomb-LTE
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index acbf08b..36e0202 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -191,6 +191,10 @@ public class TelephonyManager {
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getDeviceId() {
+ if (!isVoiceCapable()) {
+ return null;
+ }
+
try {
return getSubscriberInfo().getDeviceId();
} catch (RemoteException ex) {