diff --git a/src/com/android/settings/network/telephony/MobileNetworkUtils.java b/src/com/android/settings/network/telephony/MobileNetworkUtils.java index 9049a2a300f..894eb68ebf7 100644 --- a/src/com/android/settings/network/telephony/MobileNetworkUtils.java +++ b/src/com/android/settings/network/telephony/MobileNetworkUtils.java @@ -421,20 +421,21 @@ public class MobileNetworkUtils { } private static boolean isGsmBasicOptions(Context context, int subId) { - final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) - .createForSubscriptionId(subId); final PersistableBundle carrierConfig = context.getSystemService( CarrierConfigManager.class).getConfigForSubId(subId); - - if (telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) { - return true; - } else if (carrierConfig != null + if (carrierConfig != null && !carrierConfig.getBoolean( CarrierConfigManager.KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL) && carrierConfig.getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL)) { return true; } + final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) + .createForSubscriptionId(subId); + if (telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) { + return true; + } + return false; }