Merge "Returns null not empty string if MEID is not available"

am: 634c108060

Change-Id: I75230fdc0f1014f5fc5d3e986c951bf5ece4d545
This commit is contained in:
Ruijie Bai
2019-10-29 17:45:25 -07:00
committed by android-build-merger

View File

@@ -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) {