Add index for Hotspot settings page into search

Added index provider into TetherSettings and WifiTetherSettings pages.
Added robotests to check the keys returned by getNonIndexableKeys.
Move repeated code into utility class.

Bug: 74777873
Test: make -j RunSettingsRoboTests
Test: atest UniquePreferenceTest
Change-Id: I6cb09d735afa4867d25a79de733ce8c59634e49b
This commit is contained in:
Chilun
2018-03-26 18:28:56 +08:00
parent 0e79a3a733
commit d3358d8a6f
8 changed files with 365 additions and 19 deletions

View File

@@ -17,6 +17,7 @@
<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">
<com.android.settings.widget.FixedLineSummaryPreference
@@ -29,12 +30,14 @@
<SwitchPreference
android:key="usb_tether_settings"
android:title="@string/usb_tethering_button_text"
android:summary="@string/usb_tethering_subtext" />
android:summary="@string/usb_tethering_subtext"
settings:keywords="@string/keywords_hotspot_tethering" />
<SwitchPreference
android:key="enable_bluetooth_tethering"
android:title="@string/bluetooth_tether_checkbox_text"
android:summary="@string/bluetooth_tethering_subtext" />
android:summary="@string/bluetooth_tethering_subtext"
settings:keywords="@string/keywords_hotspot_tethering" />
<Preference
android:key="disabled_on_data_saver"

View File

@@ -18,6 +18,7 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="wifi_tether_settings_screen"
android:title="@string/wifi_hotspot_checkbox_text"
settings:initialExpandedChildrenCount="2">
@@ -43,4 +44,4 @@
android:dialogTitle="@string/wifi_hotspot_ap_band_title"
android:negativeButtonText="@string/cancel"
android:positiveButtonText="@string/apply"/>
</PreferenceScreen>
</PreferenceScreen>