Add getDescendants to Settings Slice Provider

getDescendants allows another app to collect a list
of all valid Uris for Settings Slices. Important for search,
assistant or launcher apps.

This means searching our database for all valid keys and building
a list of Uris for each of those keys.

Fixes: 77808328
Test: robotests
Change-Id: I3ae27e4661a7dcaab50b091ae2730013118af8a2
This commit is contained in:
Matthew Fritze
2018-03-26 17:30:20 -07:00
parent d743f20618
commit 6730a061b1
6 changed files with 392 additions and 33 deletions

View File

@@ -130,7 +130,7 @@ public class SliceBuilderUtils {
// Example: "/action/wifi" -> [{}, "action", "wifi"]
// "/action/longer/path" -> [{}, "action", "longer/path"]
if (split.length != 3) {
throw new IllegalArgumentException("Uri (" + uri + ") has incomplete path: " + path);
return null;
}
final boolean isInline = TextUtils.equals(SettingsSlicesContract.PATH_SETTING_ACTION,