Add setting to go to sleep after long user inactivity
The European Commision prescribes an auto-standby feature for TV panels: After some hours of inactivity, the device has to go from on-mode to standby-mode or off-mode, or another condition not exceeding the applicable requirements for standby-mode or for off-mode. After a long time of no user activity the device should go to sleep, even if wakelocks are held (eg. during video playback). Test: 1. Set attentive timeout low, to 35s: `adb shell settings put secure attentive_timeout 35000` 2. Play a YouTube video 3. Observe warning dialog appearing after 5s 4. Verify: Clicking a remote button or changing the setting higher hides the warning. Remote button press is consumed. 5. Verify: After 35s of not pressing a button the device goes to sleep 6. Verify: If "Stay awake" developer option is enabled, then warning is not displayed and device does not go to sleep after 35s 7. Verify: No warning or sleep if setting is set to -1 Test: `atest frameworks/base/services/tests/servicestests/src/com/android/server/power/PowerManagerServiceTest.java` Bug: 137633812 Change-Id: I551b6cffc336437fb1c5a00b4102f68ae0e003e9
Loading
Please register or sign in to comment