diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java index 4f729ca76e6f..4058994bbf2a 100644 --- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -2335,10 +2335,12 @@ abstract public class GeckoApp break; } String mcc_mnc = tm.getNetworkOperator(); - mcc = mcc_mnc.substring(0, 3); - mnc = mcc_mnc.substring(3); - obj.put("mcc", mcc); - obj.put("mnc", mnc); + if (mcc_mnc.length() > 3) { + mcc = mcc_mnc.substring(0, 3); + mnc = mcc_mnc.substring(3); + obj.put("mcc", mcc); + obj.put("mnc", mnc); + } obj.put("asu", mSignalStrenth); } catch(JSONException jsonex) {} cellInfo.put(obj);