summaryrefslogtreecommitdiff
path: root/src/com/android/settings/display/AutoBrightnessPreferenceController.java
AgeCommit message (Collapse)Author
2021-11-01Add highlight menu keys for all toggle pref controllers and custom slicesJason Chiu
Bug: 204695404 Test: manual, robotest build pass, unit Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2019-09-09Revert "Fix subtext didn't change after toggle changed"Sunny Shao
This reverts commit 5d333991019c5fc0f974d040e50c426831ff9a2a. Reason for revert: Subtext must display from its resource xml file, don't just show on/off. Change-Id: I57a647be1aa2da881caf444c36991da0cdff73f6
2019-09-04Fix subtext didn't change after toggle changedSunny Shao
Add the ContentObserver to monitor the key value changed in the Settings.System. Fixes: 140475264 Test: manual test Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.display Change-Id: I3018498ae32fb282bc180db7864a9813a168b9c0
2019-04-24Tweak search result for adaptive brightnesstmfang
- Create a new controller for auto brightness in auto_brightness_detail.xml. - We only show slice version for search result. - Change slice summary for adaptive brightness. Test: visual Fixes: 130651278 Change-Id: If9b71735bbb2a0ee22676d9dfedab2cf9e778493
2018-11-29Fix adaptive brightness not appearing in Settings searchStanley Wang
Change-Id: I33ed525b3c051a982869114754bd3b7423b61d22 Fixes: 117449384 Test: manual
2018-08-17Use searchable="false" to suppress nonIndexables.Fan Zhang
When possible, remove or simplify getNonIndexable() logic in fragments, and use searchable="false" in xml to suppress index. Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69 Fixes: 112608186 Test: robotest and manual search
2018-07-10Update auto brightness pref summary to show on/offFan Zhang
Change-Id: I7914957cc9dbffcc12e34fc714bb9c37783a4f33 Fixes: 109885418 Test: robotests
2018-06-21Remove search indexing pipeline from SettingsFan Zhang
Index is already handled by SettingsIntelligenec. No longer needed in Settings. Change-Id: Id43fb3100dc2759185744441cff8cb9cd2d2da20 Fixes: 69808376 Test: robotests
2018-06-18Reorder and clean up imports.Fan Zhang
Test: rebuild Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-05-22Add isSliceable API to BasePrefControllerMatthew Fritze
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
2018-05-09Establish permanently unavailable settingsMatthew Fritze
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
2018-01-04Merge sub pages for lock/unlock into 1 xml.Fan Zhang
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
2017-11-27Add SettingsPrefController for SlicesMatthew Fritze
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
2017-10-24Only allow Settings app launch search result pageFan Zhang
Bug: 68199963 Test: robotest Change-Id: I0018e9c60b0dd46fc2420a563a93b706bf252dc4
2017-07-25Add default value to inline payloadsMatthew Fritze
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
2017-06-26Make PreferenceController a mixinTony Mantler
Bug: 62912136 Test: Existing tests in BaseSearchIndexProviderTest Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-20Block inline-results from Settings searchMatthew Fritze
Change-Id: I51ac1d6510bdbd6818c91836117d9ffb059cf4ab Fixes: 62806412 Test: make RunSettingsRoboTests
2017-06-02Simplify InlineSwitchPayloads and generalize get/set methodMatthew Fritze
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
2017-05-23Remove search2 package and put everything into searchMatthew Fritze
Change-Id: Ie8651c79ef023f154cd7120a88a20f3481abce2b Fixes: 38502743 Test: make RunSettingsRoboTests
2017-04-19Remove duplicates between battery and display settingsMatthew Fritze
Change preference keys of duplicate settings between display and battery to avoid duplication in search. Bug: 33701673 Test: make RunSettingsRoboTests Change-Id: I56c82e9e7f163d345065ca478849de9b14c173fe
2017-04-14Build Intents at index timeMatthew Fritze
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
2017-02-06Add Adaptive brightness as an inline result in SearchMatthew Fritze
Bug: 34740449 Test: make RunSettingsRoboTests Change-Id: I71acdcc04780a76263171a9d312d88a1eb61624a
2016-12-07Remove no-op handlePerferenceTreeClick from PrefControllersFan Zhang
Bug: 33429853 Test: RunSettingsRoboTests Change-Id: I5633953e3d7b07f9006e541b96a24a2a769e2686
2016-10-25Fix logging spam in DashboardFragment.Fan Zhang
When updating preferences managed through PreferenceController, the fragment should skip prefs that are not available. Bug: 32255863 Test: RunSettingsRoboTests Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
2016-10-18Add progressive disclsoureFan Zhang
- 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
2016-10-10Add display settings dashboard to new IA.Fan Zhang
- 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