Commit Graph

8 Commits

Author SHA1 Message Date
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Doris Ling
4fbf04cd10 Remove unnecessary onDeveloperOptionsSwitchEnabled/Disabled override.
- default implementation has been added in the super class to handle
enabling/disabling the preference when the master developer options
switch it turned on/off. Removing all subclass that originally
implemented the methods that only contains the default behavior.

Bug: 73955632
Test: make RunSettingsRoboTests
Change-Id: I13c372c2ab498a5786b40cdc1ad3b5f3424abb5a
2018-03-01 13:58:29 -08:00
jeffreyhuang
17edf20fa5 Lazy load SettingsObserver
- Lazy load the SettingsObserver in StayAwakePreferenceController
 so that search indexing works properly

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I1e2afb106ce293f616143da3f37fbde3829f414f
2017-10-16 16:56:26 -07:00
jeffreyhuang
37df3d6d1f Move DevOptionsPrefCtrl to SettingsLib
- Move DeveloperOptionsPreferenceController

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Ie434d479d8d3f7527ffce54f241ac2e090e0fc44
2017-10-09 10:17:44 -07:00
jeffreyhuang
f74a2575a9 isAvailable is true by default in dev options
- isAvailable() is defaulted to return true for all developer options
 preferences
 - child controllers should override for custom hiding logic

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I89921f801c25e74bf78d02c55b5f34cf1d464cd0
2017-09-28 18:19:43 -07:00
jeffreyhuang
f5539a1969 Add isAvailable check to devOptionsController
- This avoids the null check for PreferenceControllers where isAvailable()
 is not always true

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: Ibed8bc6a2a812355c521620d77fb571c1fd8a649
2017-09-20 13:44:16 -07:00
jeffreyhuang
4bfa56a7fd Introduce DeveloperOptionsPreferenceController
- New abstract class for all preference controllers in developer
 options
 - Used to handle changes in the master switch
 - DeveloperSettingsDashboardFragment has a reference to all preference
 controllers to call "handleMasterSwitchToggled()"

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I64c18f54e22551f025029336880e92ac3a0d4a8c
2017-09-15 15:27:26 -07:00
jeffreyhuang
f4e1295f6f Introduce StayAwakePreferenceController
- Create new StayAwakePreferenceController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
ROBOTEST_FILTER=StayAwakePreferenceControllerTest

Change-Id: I7642656fb2e323878face52f0a3c57fec1d85ac4
2017-09-13 14:56:36 -07:00