Files
app_Settings/res/xml/adaptive_sleep_detail.xml
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

40 lines
1.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="adaptive_sleep_detail"
android:title="@string/adaptive_sleep_title">
<!-- TODO(111939367): add correct animation -->
<com.android.settings.widget.VideoPreference
android:key="adaptive_sleep_video"
android:title="@string/summary_placeholder"
settings:animation="@raw/aab_brightness"
settings:preview="@drawable/aab_brightness"
settings:controller="com.android.settings.widget.VideoPreferenceController"/>
<com.android.settingslib.RestrictedSwitchPreference
android:key="adaptive_sleep"
android:title="@string/adaptive_sleep_title"
settings:keywords="@string/keywords_display_adaptive_sleep"
settings:controller="com.android.settings.display.AdaptiveSleepPreferenceController"
settings:useAdminDisabledSummary="true"
settings:allowDividerAbove="true" />
</PreferenceScreen>