Merge "Make getDeviceId return null for Non-phone device." into honeycomb-LTE
This commit is contained in:
@@ -191,6 +191,10 @@ public class TelephonyManager {
|
|||||||
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||||
*/
|
*/
|
||||||
public String getDeviceId() {
|
public String getDeviceId() {
|
||||||
|
if (!isVoiceCapable()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return getSubscriberInfo().getDeviceId();
|
return getSubscriberInfo().getDeviceId();
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user