Add ability to show/hide Wi-Fi settings, and all related sub-settings.
This adds a new boolean flag, config_show_wifi_settings, which when set to false will hide the "Wi-Fi" page in network & internet (there is no key value associated with this preference page). It will also hide nested pages from search results, such as Wi-Fi preferences. Bug: 62379554 Test: make RunSettingsRoboTests ROBOTEST_FILTER=ConfigureWifiSettingsTest and make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest and make RunSettingsRoboTests ROBOTEST_FILTER=WifiMasterSwitchPreferenceControllerTest all pass. Change-Id: Iedc6bc272e0cb2b561c6bf25968e70f355aaaa8e
This commit is contained in:
@@ -44,6 +44,17 @@ public class ConfigureWifiSettingsTest {
|
||||
assertThat(keys).containsAllIn(niks);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(qualifiers = "mcc999")
|
||||
public void testNonIndexableKeys_ifPageDisabled_shouldNotIndexResource() {
|
||||
final List<String> niks = ConfigureWifiSettings.SEARCH_INDEX_DATA_PROVIDER
|
||||
.getNonIndexableKeys(mContext);
|
||||
final int xmlId = new ConfigureWifiSettings().getPreferenceScreenResId();
|
||||
|
||||
final List<String> keys = XmlTestUtils.getKeysFromPreferenceXml(mContext, xmlId);
|
||||
assertThat(niks).containsAllIn(keys);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNonIndexableKeys_noConnection_blocksIP() {
|
||||
ConnectivityManager manager = mock(ConnectivityManager.class);
|
||||
|
Reference in New Issue
Block a user