- Add boolean useDynamicSliceSummary() in Sliceable interface. This is
the switch equivalent to android:allowDynamicSummaryInSlice in xml. It
moves the setter closer to regular Sliceable APIs, thus less easily to
miss.
- Coverted all android:allowDynamicSummaryInSlice to use the java API.
- Except 2 prefs in my_device_info. They incorrectly set this to true
previously (controller is not sliceable, no point setting
dynamicSliceSummary to true. They just won't do anything)
Fixes: 128446156
Test: robolectric
Change-Id: Ic57acd590dec3e87dcf4592df137321d14b854d9
When a slice is depending on some setting and the setting is off,
it shows "depends on another setting".
Add an new attribute for Preference to customize the subtitle when
a slice is unavailable.
Bug: 118399193
Test: Robo test on com.android.settings.slices, com.android.settings.core
Change-Id: I84a8400295b36abb357e5baf98e9be3a8d6ea897
For now, slice view shows screen title by default,
but it isn't approprate for some simple cases.
ie, device model, phone number, android version etc.
So, We create a new attribue which let BasePreferenceController
be more flxible. User can choose what they want to show
in summary text.
Fixes: 74900516
Test: make RunSettingsRoboTests
Change-Id: I2788c6edfaf8e656170a507607f22513841a3e0a
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Attach the keywords used for Settings search to Slices.
Their primary use is helping match synonyms for presenters
which display slices without explicit Uri requests, like a launcher.
This changes:
- Updates database scheme
- Adds to SliceData object
- Grab keywords in the SliceDataConverter
- Set keywords on all slices
Test: robotests
Change-Id: I16c40d2380ffddaf0a87fb1b9cd58e95573b308f
Fixes: 78306195
Extend slices_index.db to include SliceType and platform flag.
This will be used when we generate a list of all available slices
for different authorities & separated intent/action paths.
Bug: 62807132
Test: robotests
Change-Id: I1cce49d077c02ab79153db9bfdfc894dbab5e16a
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
The indexing is done by taking the indexable fragments from
search, grabbing their XML via SearchIndexableResources, and
then looking for controllers defined in preferences.
For each controller found, we take the combination of the
fragment providing the XML and the Preference info to create
an indexable row.
Buiding a Slice will be handled in a subsquent CL, but a
prototype can be found here: ag/3324435
Test: robotests
Bug: 67996923
Change-Id: I48668618079bcc3da55ab77b7323ee8e467073af
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