Files
app_Settings/res/xml/display_settings.xml
Adrian Roos 95ff1f4131 AOD: Add temporary always-on setting
Adds a setting for controlling always-on ambient display
until the new ambient display settings screen is implemented.

Also updates DozePreferenceController to use the the
AmbientDisplayConfiguration helper instead of recreating that
logic.

Also adds tests for both doze preference controllers.

Bug: 33279975
Test: Toggle "Settings > Display > Always on", verify ambient display is on / off
Test: make RunSettingsRoboTests
Change-Id: If36356bc29329a4e0732e79db662ffb02c9fc189
2017-05-11 17:15:20 -07:00

134 lines
5.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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/com.android.settings"
android:title="@string/display_settings"
settings:keywords="@string/keywords_display">
<Preference
android:key="brightness"
android:title="@string/brightness"
settings:keywords="@string/keywords_display_brightness_level">
<intent android:action="com.android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
</Preference>
<com.android.settings.display.NightDisplayPreference
android:key="night_display"
android:title="@string/night_display_title"
android:fragment="com.android.settings.display.NightDisplaySettings"
settings:widgetLayout="@null"
settings:keywords="@string/keywords_display_night_display" />
<SwitchPreference
android:key="auto_brightness"
android:title="@string/auto_brightness_title"
settings:keywords="@string/keywords_display_auto_brightness"
android:summary="@string/auto_brightness_summary" />
<com.android.settingslib.RestrictedPreference
android:key="wallpaper"
android:title="@string/wallpaper_settings_title"
settings:keywords="@string/keywords_display_wallpaper"
settings:useAdminDisabledSummary="true">
<intent
android:targetPackage="@string/config_wallpaper_picker_package"
android:targetClass="@string/config_wallpaper_picker_class" />
</com.android.settingslib.RestrictedPreference>
<com.android.settings.TimeoutListPreference
android:key="screen_timeout"
android:title="@string/screen_timeout"
android:summary="@string/summary_placeholder"
android:entries="@array/screen_timeout_entries"
android:entryValues="@array/screen_timeout_values" />
<SwitchPreference
android:key="auto_rotate"
android:title="@string/accelerometer_title" />
<Preference
android:key="font_size"
android:title="@string/title_font_size"
android:fragment="com.android.settings.accessibility.ToggleFontSizePreferenceFragment"
settings:keywords="@string/keywords_display_font_size" />
<com.android.settings.display.ScreenZoomPreference
android:key="screen_zoom"
android:title="@string/screen_zoom_title"
settings:keywords="@string/screen_zoom_keywords" />
<Preference
android:key="screensaver"
android:title="@string/screensaver_settings_title"
android:fragment="com.android.settings.dream.DreamSettings" />
<!-- Hide night mode for now
<ListPreference
android:key="night_mode"
android:title="@string/night_mode_title"
settings:keywords="@string/keywords_display_night_mode"
android:summary="@string/night_mode_summary"
android:entries="@array/night_mode_entries"
android:entryValues="@array/night_mode_values" /> -->
<SwitchPreference
android:key="camera_gesture"
android:title="@string/camera_gesture_title"
android:summary="@string/camera_gesture_desc" />
<SwitchPreference
android:key="lift_to_wake"
android:title="@string/lift_to_wake_title" />
<Preference
android:key="gesture_double_tap_screen"
android:title="@string/ambient_display_title"
android:fragment="com.android.settings.gestures.DoubleTapScreenSettings" />
<Preference
android:key="gesture_pick_up"
android:title="@string/ambient_display_pickup_title"
android:fragment="com.android.settings.gestures.PickupGestureSettings" />
<SwitchPreference
android:key="doze"
android:title="@string/doze_title"
android:summary="@string/doze_summary" />
<SwitchPreference
android:key="doze_always_on"
android:title="@string/doze_always_on_title"
android:summary="@string/doze_always_on_summary" />
<SwitchPreference
android:key="tap_to_wake"
android:title="@string/tap_to_wake"
android:summary="@string/tap_to_wake_summary" />
<ListPreference
android:key="theme"
android:title="@string/device_theme"
android:summary="@string/summary_placeholder" />
<Preference
android:key="vr_display_pref"
android:title="@string/display_vr_pref_title"
android:fragment="com.android.settings.display.VrDisplayPreferencePicker" />
</PreferenceScreen>