Commit Graph

8 Commits

Author SHA1 Message Date
Yi Jiang
d66878f8fe Refresh camera permission status when it changed.
Bug: 135497543
Test: Manually tested
Change-Id: I833e1658bc7888557635b764599c7a0baa226612
2019-06-21 15:07:50 -07:00
Yi Jiang
c26745207d Show a 'permission missing' message in Screen Attention settings.
Bug: 129284701
Test: Manually verified.
Test: atest AdaptiveSleepSettingsTest

Change-Id: I6375929d59479a0aeb7e4aec184bd36e7f3ab33b
2019-06-10 17:18:10 -07:00
Yi Jiang
7605494cc5 Adds contextual cards for screen attention in Settings Homepage
Bug: 128527964
Test: atest ContextualAdaptiveSleepSliceTest, maually verified.
Change-Id: Ifaea7d8d4391e91cf6cbde38a2506728f55913d8
2019-05-29 10:37:11 -07:00
Yi Jiang
6da0447068 Fix unexpected grey-out in Screen attention
Fix preference controller searchable issue.

Bug: 132821023
Bug: 133255690
Test: atest AdaptiveSleepPreferenceControllerTest
Change-Id: I686ed827fbe572c9d8bcde2d8a8e00f2dcb5a6a8
2019-05-24 16:50:18 -07:00
Alex Salo
83a63abd2d Re-enable the test
Update the test to handle new API and simplify the logic in the
controller.

Bug: 130897305
Test: make RunSettingsRoboTests -j64

Change-Id: I0c46ff22d4a3bf913add753f85a24af9aeee0a33
2019-05-08 17:48:12 +00:00
Alex Salo
c821ae1ee6 Check for attention permissions
If attention package does not have sufficient permissions - disable the
setting.

Bug: 130246574, 130350903
Test: make RunSettingsRoboTests and manually confirmed
Change-Id: Ia7a86c940522e72f7e895d6aec7500f1ef6f9889
2019-04-16 17:43:15 +00:00
Alex Salo
962a7ec22d Remove unused dependency
Test: not needed
Bug: 111939367
Change-Id: Id6040240e6221fe6311b7985f3763c04989be7d2
2019-01-31 18:20:16 +00:00
Alex Salo
bb4e9ce201 Add "Adaptive sleep" setting
Adaptive sleep setting, if enabled, will perform an attention check
right before the power manager is scheduled to dim and then turn off the
display. If the attention check says that user is currently paying
attention to the device, the screen sleep timeout timer will be reset,
as if user had interacted with the display.

The animation and explanation strings are still TBC per UX team.

The setting is only displayed on supported devices.

Test: make RunSettingsRoboTests
Bug: 111939367
Change-Id: I191dd8ef06ecec4edbe4357671a7a9360971c06f
2019-01-28 11:39:00 -08:00