Merge "Returns null not empty string if MEID is not available" am: 634c108060 am: 02445f14da

am: 7a318f0646

Change-Id: I41b8c9de8c7bd0c2a93c9f8444e77af84c50c293
This commit is contained in:
Ruijie Bai
2019-10-29 18:08:05 -07:00
committed by android-build-merger

View File

@@ -1873,7 +1873,12 @@ public class TelephonyManager {
if (telephony == null) return null;
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) {
return null;
} catch (NullPointerException ex) {