Remove separate control for display of Enhanced 4G LTE Mode
Use the VoLTE/VT (IMS) enablement configuration for display of the
configuration. I.e. there is no need for displaying the configuration
when the device does not support IMS.
Bug: 17365969
Change-Id: I009482c2e28ce668653962d20d340d1eb96def87
diff --git a/res/values/config.xml b/res/values/config.xml
index 0ced13f..3daf89a 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -120,8 +120,6 @@
<bool name="config_enabled_lte" translatable="false">false</bool>
<!-- Show cdma auto network mode in (glabal) roaming -->
<bool name="config_show_cdma" translatable="false">false</bool>
- <!-- Display enhanced 4G LTE mode menu if true -->
- <bool name="config_enhanced_4g_lte_mode_enable" translatable="false">false</bool>
<!-- Package name for the default in-call UI and dialer [DO NOT TRANSLATE] -->
<string name="ui_default_package" translatable="false">com.android.dialer</string>
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index 1806558..e6fc11c 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -330,22 +330,13 @@
android.util.Log.d(LOG_TAG, "keep ltePref");
}
- // Enable enhanced 4G LTE mode settings depending on the value in config.xml
- final boolean isEnhanced4GLteModeEnabled = getResources().getBoolean(
- R.bool.config_enhanced_4g_lte_mode_enable);
- if (!isEnhanced4GLteModeEnabled) {
+ // Enable enhanced 4G LTE mode settings depending on whether exists on platform
+ if (!ImsManager.isEnhanced4gLteModeSettingEnabledByPlatform(this)) {
Preference pref = prefSet.findPreference(BUTTON_4G_LTE_KEY);
if (pref != null) {
prefSet.removePreference(pref);
}
}
- Preference pref = prefSet.findPreference(BUTTON_4G_LTE_KEY);
- if (pref != null) {
- if (!ImsManager.isEnhanced4gLteModeSettingEnabledByPlatform(this)) {
- ((SwitchPreference)pref).setChecked(false);
- pref.setEnabled(false);
- }
- }
ActionBar actionBar = getActionBar();
if (actionBar != null) {