Merge "Parsing mcc and mnc as integers when null does not work" am: efbeef6438

Original change: https://android-review.googlesource.com/c/platform/packages/providers/TelephonyProvider/+/1989566

Change-Id: I5c6b7898864fe125c9a274be800ad237d6e42738
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index 956cebf..be42ab3 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -2392,7 +2392,7 @@
             String mncString = mnc;
             // Since an mnc can have both two and three digits and it is hard to verify
             // all OEM's Global APN lists we only do this for overlays.
-            if (isOverlay) {
+            if (isOverlay && mcc !=null && mnc != null) {
                 mccString = String.format("%03d", Integer.parseInt(mcc));
                 // Looks up a two digit mnc in the carrier id DB
                 // if not found a three digit mnc value is chosen