Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.
Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.
Test: robotests
Bug: 79779103
Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.
The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.
Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.
Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
And create PreferenceControllers for each setting
The page is still pretty janky and controllers are invoked manually.
Next CL will clean these up.
Bug: 32953042
Test: TODO
Change-Id: I1d7478324f5de4fdb464d79f89086f7e79c0ee67
Adds a new abstraction layer between preference controllers
and the AbstractPreferenceController. The layer is used to
consolidate the logic for each the setting type for getting
and setting values. This will be extended to support UI
information for Slices.
For reference how this fits into Slices, look at the
like-named classes added in this prototype:
ag/3221891
The changes in Search are as a transition into deprecation.
The code for Search in Settings is out-of-date from the
unbundled counterpart, and this change is made so that the
current code behaves as normal.
Test: robotests
Bug: 67996707
Change-Id: Ib1faab706485039edad66119a27a3fd5cabe6009
If we try to set an inline result when it has not yet been
accessed in settings, nothing is read from Settings.
Thus, include a default value for a fallback.
Manual merge for: ag/2588219/
Change-Id: I3b8eea4f82764852cea642db4455ba57f10a7d37
Fixes: 63955012
Test: robotests
InlineSwitchPayload now assumes that all switches will be
stored as 1 or 0, which simplifies the code.
Moves Availability into ResultPayload, so that custom
payloads can be created to set/get values which are more
complicated than stotring ints (like bluetooth or DnD),
and give more expressive reasons when unavailable.
Bug: 62022517
Test: make RunSettingsRoboTests
Change-Id: I87e6fc041bfd398e7daf6e6e479d502930d36f0f
Change preference keys of duplicate settings between
display and battery to avoid duplication in search.
Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: I56c82e9e7f163d345065ca478849de9b14c173fe
In order to index Intents into Icing, they need to be
built at Index time rather than at Search time.
Test: make RunSettingsRoboTests
Bug: 36443380
Change-Id: Ia731b5038380bb658232e2e175f52a81d86d7e02
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
- Add a ProgressiveDisclosureMixin that contains all logic for collapse
preference list when it's too long
- Refactored PreferenceController's updateState to take a preference
instead of PreferenceScreen, because with progressive disclosure the
preference can either be in screen or the mixin. DashboardFragment is
responsible finding the preference before passing it to controller.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I6713abd61c954ce12732902e5b3ca4d4c0b1563e
- Added a activity-alias pointing to displaySettings as top level
setting item.
- Refactored all preference logic in DisplaySettings into
PreferenceControllers. During fragment onAttach it installs all
controllers, and during onResume it updates preference state. Each
controller listens to its own preference change event.
Bug: 31800242
Test: RunSettingsRoboTests
Change-Id: Ibc9bf200c5acce7c4ae9292340822afee27a3a28