Add custom site map pairs into SettingsSearchIndexablesProvider
Settings Search need Settings to provide custom site map pairs to build up full breadcrumb for the search results from ScreenLockSettings, WallpaperSuggestionActivity and WifiSettings2. Bug: 147851992 Bug: 151206664 Test: manual test with Settings Search, robotests Change-Id: Ide6e69b3336af255a388737d46147f2fc2ef9790
This commit is contained in:
@@ -211,6 +211,14 @@ public class SettingsSearchIndexablesProvider extends SearchIndexablesProvider {
|
||||
.add(SearchIndexablesContract.SiteMapColumns.CHILD_TITLE, childTitle);
|
||||
}
|
||||
}
|
||||
|
||||
// Loop through custom site map registry to build additional SiteMapPairs
|
||||
for (String childClass : CustomSiteMapRegistry.CUSTOM_SITE_MAP.keySet()) {
|
||||
final String parentClass = CustomSiteMapRegistry.CUSTOM_SITE_MAP.get(childClass);
|
||||
cursor.newRow()
|
||||
.add(SearchIndexablesContract.SiteMapColumns.PARENT_CLASS, parentClass)
|
||||
.add(SearchIndexablesContract.SiteMapColumns.CHILD_CLASS, childClass);
|
||||
}
|
||||
// Done.
|
||||
return cursor;
|
||||
}
|
||||
|
Reference in New Issue
Block a user