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