Loading telephony/java/android/telephony/TelephonyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -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} Loading telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +7 −2 Original line number Diff line number Diff line Loading @@ -452,9 +452,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() { Loading Loading
telephony/java/android/telephony/TelephonyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -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} Loading
telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +7 −2 Original line number Diff line number Diff line Loading @@ -452,9 +452,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() { Loading