Commit Graph

9 Commits

Author SHA1 Message Date
yuemingw
cdeeaff473 Block sleep options in Settings app when DISALLOW_CONFIG_SCREEN_TIMEOUT is set.
Test: m -j RunSettingsRoboTests
Bug: 67675734
Change-Id: Icdcadd03caa2884338d4300fb41f0036b8b9eb51
2018-01-19 20:01:21 +00:00
Pavel Grafov
8e02f0e7e7 Managed profile lock timeout
Test: make ROBOTEST_FILTER=TimeoutPreferenceControllerTest RunSettingsRoboTests
Test: make ROBOTEST_FILTER=LockAfterTimeoutPreferenceControllerTest RunSettingsRoboTests
Bug: 63908311
Change-Id: I7236ec4ca37353703145c3e75d508101ecc6ca80
2017-12-20 17:34:28 +00:00
Pavel Grafov
d50a536d1d Unit test for screen timeout policy handling in Settings
This is a follow-up for http://ag/3123412

Test: make ROBOTEST_FILTER=LockAfterTimeoutPreferenceControllerTest RunSettingsRoboTests
Test: make ROBOTEST_FILTER=TimeoutPreferenceControllerTest RunSettingsRoboTests

Bug: 63908311
Change-Id: I27631743d52163f3b6d1589b427ba617e74725a9
2017-12-19 21:05:16 +00:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Matthew Fritze
c6f2638009 Remove duplicates between battery and display settings
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-19 14:34:13 -07:00
Fan Zhang
9b6f181340 Remove no-op handlePerferenceTreeClick from PrefControllers
Bug: 33429853
Test: RunSettingsRoboTests
Change-Id: I5633953e3d7b07f9006e541b96a24a2a769e2686
2016-12-07 15:34:31 -08:00
Fan Zhang
242da31179 Fix logging spam in DashboardFragment.
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
2016-10-25 17:14:47 -07:00
Fan Zhang
db1112a221 Add progressive disclsoure
- 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-18 16:57:11 -07:00
Fan Zhang
66b573ad5a Add display settings dashboard to new IA.
- 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
2016-10-10 18:26:29 -07:00