Make the fragment title can’t searchable
we shouldn't take users so deep into the settings IA because it's easy to feel lost in settings after clicking on a result without additional context. Bug: 143055215 Test: robotest & manual Change-Id: I337cb5ead31e1e4e7bf9be78132e90630f83ee43
This commit is contained in:
@@ -52,7 +52,6 @@ import com.android.settings.R;
|
||||
import com.android.settings.datausage.DataUsagePreference;
|
||||
import com.android.settings.testutils.shadow.ShadowDataUsageUtils;
|
||||
import com.android.settings.testutils.shadow.ShadowFragment;
|
||||
import com.android.settingslib.search.SearchIndexableRaw;
|
||||
import com.android.settingslib.wifi.AccessPoint;
|
||||
import com.android.settingslib.wifi.WifiTracker;
|
||||
|
||||
@@ -99,26 +98,6 @@ public class WifiSettingsTest {
|
||||
mWifiSettings.mWifiManager = mWifiManager;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSearchIndexProvider_shouldIndexFragmentTitle() {
|
||||
final List<SearchIndexableRaw> indexRes =
|
||||
WifiSettings.SEARCH_INDEX_DATA_PROVIDER.getRawDataToIndex(mContext,
|
||||
true /* enabled */);
|
||||
|
||||
assertThat(indexRes).isNotNull();
|
||||
assertThat(indexRes.get(0).key).isEqualTo(WifiSettings.DATA_KEY_REFERENCE);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(qualifiers = "mcc999")
|
||||
public void testSearchIndexProvider_ifWifiSettingsNotVisible_shouldNotIndexFragmentTitle() {
|
||||
final List<SearchIndexableRaw> indexRes =
|
||||
WifiSettings.SEARCH_INDEX_DATA_PROVIDER.getRawDataToIndex(mContext,
|
||||
true /* enabled */);
|
||||
|
||||
assertThat(indexRes).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addNetworkFragmentSendResult_onActivityResult_shouldHandleEvent() {
|
||||
final WifiSettings wifiSettings = spy(new WifiSettings());
|
||||
|
Reference in New Issue
Block a user