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:
@@ -19,16 +19,12 @@ package com.android.settings.gestures;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.hardware.display.AmbientDisplayConfiguration;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@SearchIndexable
|
||||
public class GestureSettings extends DashboardFragment {
|
||||
|
||||
@@ -67,20 +63,5 @@ public class GestureSettings extends DashboardFragment {
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
@Override
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
||||
Context context, boolean enabled) {
|
||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||
sir.xmlResId = R.xml.gestures;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
// All rows in this screen can lead to a different page, so suppress everything
|
||||
// from this page to remove duplicates.
|
||||
return false;
|
||||
}
|
||||
};
|
||||
new BaseSearchIndexProvider(R.xml.gestures);
|
||||
}
|
||||
|
Reference in New Issue
Block a user