Add the ability to define a Preference Controller
in xml using the 'controller' tag.
This is useful for two reasons:
- It allows the controllers to be instantiated via
reflection for Slices and Dashboard fragment
- Removes the requirement that controllers be defined manually
in Fragments
In order to be instantiable, they must have a unified construction
following either:
ClassName(Context)
ClassName(Context, String)
Also added a robotest that verifies that all controllers defined
in XML follow the constructor schema, and extend
BasePreferenceController.
Test: robotests
Bug: 67996923
Change-Id: I304b35dc666daebecf0c9e286696f3f2a510704a
- Move android version from about phone subtext to system update
- Updates strings for autofill, keyboard & input, factory reset, swipe
for notification
- Add a new pref category for spell checker and personal dictionary
- Display "None" if any default app is not selected
- Display current keyboard type as language subtext
Bug: 36395109
Test: make RunSettingsRoboTests
Change-Id: Id6ca94ea31e55f1c1ec04e47dcf657a25c35c7fe
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
In order to move the preference and its logic cleanly, created a
controller object that encapsulates the preference/click handler.
Bug: 31801428
Test: RunSettingsRoboTests
Change-Id: I332384e20fbf0e21d2f3becb531d97b20f7f7ef1