Remove the Settings search keywords from Slices

The keywords used for settings search are good when we are highly
confident the user is searching for as setting (settings search),
but not effective in a more general search setting (launcher,
an assistant). Thus, we should not index these keywords as Slice
keywords, and rely on the setting title and screen title as baseline
keywords.

Change-Id: I99e44834454b5949c4883f877e02be47498e06e2
Fixes: 78911847
Test: robotests
This commit is contained in:
Matthew Fritze
2018-05-08 16:34:36 -07:00
parent 9a1d318b37
commit ff865c898f
5 changed files with 25 additions and 16 deletions

View File

@@ -56,7 +56,6 @@ public class SliceDataConverterTest {
private static final String FAKE_TITLE = "title";
private static final String FAKE_SUMMARY = "summary";
private static final String FAKE_SCREEN_TITLE = "screen_title";
private static final String FAKE_KEYWORDS = "a, b, c";
private static final String FAKE_FRAGMENT_CLASSNAME = FakeIndexProvider.class.getName();
private static final String FAKE_CONTROLLER_NAME = FakePreferenceController.class.getName();
private static final String ACCESSIBILITY_FRAGMENT = AccessibilitySettings.class.getName();
@@ -118,7 +117,7 @@ public class SliceDataConverterTest {
assertThat(fakeSlice.getTitle()).isEqualTo(FAKE_TITLE);
assertThat(fakeSlice.getSummary()).isEqualTo(FAKE_SUMMARY);
assertThat(fakeSlice.getScreenTitle()).isEqualTo(FAKE_SCREEN_TITLE);
assertThat(fakeSlice.getKeywords()).isEqualTo(FAKE_KEYWORDS);
assertThat(fakeSlice.getKeywords()).isNull();
assertThat(fakeSlice.getIconResource()).isNotNull();
assertThat(fakeSlice.getUri()).isNull();
assertThat(fakeSlice.getFragmentClassName()).isEqualTo(FAKE_FRAGMENT_CLASSNAME);