Merge "Returns null not empty string if MEID is not available"
This commit is contained in:
@@ -1887,7 +1887,12 @@ public class TelephonyManager {
|
|||||||
if (telephony == null) return null;
|
if (telephony == null) return null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return telephony.getMeidForSlot(slotIndex, getOpPackageName());
|
String meid = telephony.getMeidForSlot(slotIndex, getOpPackageName());
|
||||||
|
if (TextUtils.isEmpty(meid)) {
|
||||||
|
Log.d(TAG, "getMeid: return null because MEID is not available");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return meid;
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
return null;
|
return null;
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user