am 3158cf68
: Change CDMAPhone.getDeviceId to return MEID or ESN.
Merge commit '3158cf689f4994ec53c3b727f9b6ad7751a5551b' into gingerbread * commit '3158cf689f4994ec53c3b727f9b6ad7751a5551b': Change CDMAPhone.getDeviceId to return MEID or ESN.
This commit is contained in:
@ -177,7 +177,7 @@ public class TelephonyManager {
|
||||
|
||||
/**
|
||||
* Returns the unique device ID, for example, the IMEI for GSM and the MEID
|
||||
* for CDMA phones. Return null if device ID is not available.
|
||||
* or ESN for CDMA phones. Return null if device ID is not available.
|
||||
*
|
||||
* <p>Requires Permission:
|
||||
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||
|
@ -447,9 +447,14 @@ public class CDMAPhone extends PhoneBase {
|
||||
return mMeid;
|
||||
}
|
||||
|
||||
//returns MEID in CDMA
|
||||
//returns MEID or ESN in CDMA
|
||||
public String getDeviceId() {
|
||||
return getMeid();
|
||||
String id = getMeid();
|
||||
if ((id == null) || id.matches("^0*$")) {
|
||||
Log.d(LOG_TAG, "getDeviceId(): MEID is not initialized use ESN");
|
||||
id = getEsn();
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getDeviceSvn() {
|
||||
|
Reference in New Issue
Block a user