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
Previously if there were multiple clients it would trigger an infinite
loop as the cache gits dropped after the first bind, and the second
client would trigger another load. Instead now cache as long as slices
are pinned since thats the intended behavior of caching.
Test: make RunSettingsRoboTests
Change-Id: I7d29fab87573120b34cd55e1696c4c5b70fc891c
Fixes: 78471335
Allow things that can read the index to access slices too.
Test: existing tests unaffected
Bug: 77313888
Change-Id: I54c4b89eefb4354aa6b7dcafb7ac09dc96cbdbeb
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
Add AccessibilityPreferenceController, which wraps all a11y settings
since they are share common infrastructure for enabling, current value,
and availability.
We add an overlay for OEMs to declare their bundled a11y services.
This is the only list of services that will be possible to enabled via
Settings slices.
Accessibility Slices are built by getting a list of valid services,
and indexing the service names as a key in the Slices DB. When they are
built at runtime, they use the generic A11yPrefController to get the status
and enable/disable the service.
Bug: 67997836
Bug: 67997672
Test: robotests
Change-Id: I66f905bf1c55eecb937945c4675c12bcbc96d698
When an inline slice is requested, and the setting is unavailable,
we should present more useful information to the user. This CL handles:
- Unsupported: return intent slice to Settings home page
- Disabled for user: intent to the setting page
- Unknown reason: intent to setting page
- Disabled dependency: Create intent-based Slice rather
than the requested inline slice.
Bug: 71640747
Test: robotests
Change-Id: I9c1a0ee36119d4f9f3b205e0824c251f4356db55
The index implementation is optional and left up to the OEM.
Test: Open settings, see content in index
Test: robo tests
Bug: 68378569
Bug: 76102600
Change-Id: Idb8bb1e0cabbbe92e7a852e2eadbdcd8c2ab7d56
Create the notion of an official platform slice.
This includes:
- Adding a second authority to the provider
- tagging slices in xml with a platform slice flag
- Including authority in the getUri method
Bug:73359139
Test: robotests
Change-Id: I5382be138a262dbc5a8324c34aab131c5d0d5516
Merged-In: I581ee6dfcdf935f452a15e89e5d055e375ff1877
To add bluetooth as a valid slice requires adding
support for Context-only preference controller
constructors, which was already planned work.
Fixes: 67997327
Test: robotests
Change-Id: I7efd20a05d5796c3327a26b1fc535d5436d1070f
The slices paradigm is to return a slice as soon as possible
whith whatever information is currently available. Then, load the
longer information in the background and broadcast on the Uri when
the changes are ready.
This CL incorprates a cache system for SettingsSliceProvider to
load that data in the background to solve the issues of multiple
simultaneous callers.
Bug: 67996923
Test: robotests
Change-Id: I0e3f9984181e1c989fed139707cdb27956cf6de6
Connect the SliceIndexing data to the SliceProvider,
such that a query to SliceProvider can build a Slice
via the indexed data from SlicesIndexingManager.
We take the key from the Uri supplied to the SettingSliceProvider
and find a potential matching row in the indexed data. The
matched data is then used to Build a slice for the caller.
Bug: 67996923
Test: robotests
Change-Id: If51bfd1a05c3f3817ae720554f95a98fc7b002e1
Add in a Data object used to represent one row
in a new SQLite database used for building Slices.
The database has the following schema:
- Key
- Title
- Subtitle
- Screentitle
- Icon
- Fragment
- Controller
The key is the preference key.
Title, subtitle and Icon are for UI info.
Screentitle and fragment are for the intent.
Controller is used to get dynamic ui info (like summary),
and to take actions on the slice (like a toggle).
The actual indexing and a Slice will be handled in a subsquent CL,
but a prototype can be found here: ag/3324435
Test: robotests
Bug: 67996923
Change-Id: Id91deb58a3ab89ce1dab5a3f34cdb9ade6263aa8