Use feature flag to show/hide AllInOneTetherSettings

This partially reverts commit 0ccc849de7
which added a config value. Instead, we will use feature flag to switch
between the fragments.

This CL also adds a postfix to keys in all_tether_prefs to
de-duplicate with keys in tether_prefs and wifi_tether_settings.

Bug: 148182953
Change-Id: I92832c786473990065a965409072e4117a7e75a8
Fix: 148618984
Test: make RunSettingsRoboTests
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
This commit is contained in:
Zhen Zhang
2020-01-30 15:12:50 -08:00
parent 0141e6f943
commit d2a7f9ae79
11 changed files with 84 additions and 47 deletions

View File

@@ -434,7 +434,4 @@
<!-- Package name of dialer supports RTT setting-->
<string name="config_rtt_setting_package_name" translatable="false"></string>
<!--Whether tether settings should be shown in one screen or not-->
<bool name="config_show_all_in_one_tether_settings">false</bool>
</resources>

View File

@@ -18,48 +18,50 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="tether_prefs_screen"
android:title="@string/tether_settings_title_all">
android:key="all_tether_prefs_screen"
android:title="@string/tether_settings_title_all"
settings:searchable="false">
<PreferenceCategory
android:key="wifi_tether_settings_group"
android:title="@string/wifi_hotspot_checkbox_text"
settings:searchable="false">
<com.android.settings.wifi.tether.WifiTetherSsidPreference
android:key="wifi_tether_network_name"
android:key="wifi_tether_network_name_2"
android:title="@string/wifi_hotspot_name_title"
android:summary="@string/summary_placeholder"/>
<com.android.settings.widget.ValidatedEditTextPreference
android:key="wifi_tether_network_password"
android:key="wifi_tether_network_password_2"
android:persistent="false"
android:title="@string/wifi_hotspot_password_title"/>
<SwitchPreference
android:key="wifi_tether_auto_turn_off"
android:key="wifi_tether_auto_turn_off_2"
android:title="@string/wifi_hotspot_auto_off_title"
android:summary="@string/wifi_hotspot_auto_off_summary"/>
<ListPreference
android:key="wifi_tether_security"
android:key="wifi_tether_security_2"
android:title="@string/wifi_security"
android:summary="@string/summary_placeholder"
android:entries="@array/wifi_tether_security"
android:entryValues="@array/wifi_tether_security_values"/>
<ListPreference
android:key="wifi_tether_network_ap_band"
android:key="wifi_tether_network_ap_band_2"
android:title="@string/wifi_hotspot_ap_band_title"/>
</PreferenceCategory>
<Preference
android:key="disabled_on_data_saver"
android:key="disabled_on_data_saver_2"
android:summary="@string/tether_settings_disabled_on_data_saver"
android:selectable="false"
settings:searchable="false"
settings:allowDividerAbove="true" />
<com.android.settingslib.widget.FooterPreference
android:key="tether_prefs_footer"
android:key="tether_prefs_footer_2"
android:title="@string/tethering_footer_info"
android:selectable="false"
settings:searchable="false"/>