And slightly refactored the SliceDataConverter to remove 1 reflection.
Bug: 126222433
Test: robotest
Change-Id: Ic5782bdd71f5c9cb77879a35de81dc61c01d1912
- 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
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
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
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
onGetSliceDescendants would return empty results if
the call was made before the database was indexed.
This CL checks the index before building the list.
Change-Id: I2e0f88893138a048dbd529d465d68fa4b1a3dc12
Fixes: 78196823
Test: robotests
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
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
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
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
Add a getter for Slice type for BasePreferenceController.
This facilitates the generation of all possible Slices for Settings
search and discovery for AGSA.
Bug: 62807132
Test: robotests
Change-Id: I2cba1fc72c95769ecc26c76d1f2faa49a285d077
This moves SearchIndexableResources to be supplied by FeatureFactory
rather than its own singleton, which in effect allows OEMs to supply their
own, in the case where they have their own classes they want to be
indexed (or, remove certain classes that used to be indexed).
Bug: 72179744
Test: All tests pass.
Change-Id: Ia06b2026df7eca4c53b44a5a589c4aaa0b69d96c
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