Merge "Add Night display settings" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e577ed1b91
@@ -2133,6 +2133,39 @@
|
||||
<!-- Sound & display settings screen, setting option summary to enable adaptive brightness [CHAR LIMIT=100] -->
|
||||
<string name="auto_brightness_summary">Optimize brightness level for available light</string>
|
||||
|
||||
<!-- Night display screen, setting option name to enable night display. [CHAR LIMIT=30] -->
|
||||
<string name="night_display_title">Night display</string>
|
||||
<!-- Night display screen, description of night display feature. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_text">Night display tints your screen red at night. This makes it easier to look at your screen in dim light and may help you fall asleep more easily.</string>
|
||||
<!-- Night display screen, setting option name to configure whether night display turn on/off automatically. [CHAR LIMIT=30] -->
|
||||
<string name="night_display_auto_mode_title">Turn on automatically</string>
|
||||
<!-- Night display screen, setting option value for night display to *never* turn on/off automatically. [CHAR LIMIT=30] -->
|
||||
<string name="night_display_auto_mode_never">Never</string>
|
||||
<!-- Night display screen, setting option value for night display to turn on/off automatically according to a user defined schedule. [CHAR LIMIT=30] -->
|
||||
<string name="night_display_auto_mode_custom">Custom schedule</string>
|
||||
<!-- Night display screen, setting option value for night display to turn on/off automatically at sunset/sunrise. [CHAR LIMIT=30] -->
|
||||
<string name="night_display_auto_mode_twilight">Sunset to sunrise</string>
|
||||
<!-- Night display screen, setting option name to configure time to automatically turn on night display. [CHAR LIMIT=30] -->
|
||||
<string name="night_display_start_time_title">Start time</string>
|
||||
<!-- Night display screen, setting option name to configure time to automatically turn off night display. [CHAR LIMIT=30] -->
|
||||
<string name="night_display_end_time_title">End time</string>
|
||||
<!-- Display settings screen, summary format of night display when off. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_off">Off / <xliff:g name="auto_mode_summary" example="Never turn on automatically">%1$s</xliff:g></string>
|
||||
<!-- Display settings screen, summary of night display when off and will *never* turn on automatically. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_off_auto_mode_never">Never turn on automatically</string>
|
||||
<!-- Display settings screen, summary format of night display when off and will turn on automatically at a user defined time. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_off_auto_mode_custom">Turn on automatically at <xliff:g name="time" example="6 AM">%1$s</xliff:g></string>
|
||||
<!-- Display settings screen, summary of night display when off and will turn on automatically at sunset. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_off_auto_mode_twilight">Turn on automatically at sunset</string>
|
||||
<!-- Display settings screen, summary format of night display when on. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_on">On / <xliff:g name="auto_mode_summary" example="Never turn off automatically">%1$s</xliff:g></string>
|
||||
<!-- Display settings screen, summary of night display when on and will *never* turn off automatically. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_on_auto_mode_never">Never turn off automatically</string>
|
||||
<!-- Display settings screen, summary format of night display when on and will turn off automatically at a user defined time. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_on_auto_mode_custom">Turn off automatically at <xliff:g name="time" example="10 PM">%1$s</xliff:g></string>
|
||||
<!-- Display settings screen, summary of night display when on and will turn off automatically at sunrise. [CHAR LIMIT=NONE] -->
|
||||
<string name="night_display_summary_on_auto_mode_twilight">Turn off automatically at sunrise</string>
|
||||
|
||||
<!-- Sound & display settings screen, setting option name to change screen timeout -->
|
||||
<string name="screen_timeout">Sleep</string>
|
||||
<!-- Sound & display settings screen, setting option name to change screen timeout [CHAR LIMIT=30] -->
|
||||
@@ -5825,6 +5858,7 @@
|
||||
<string name="keywords_display">screen, touchscreen</string>
|
||||
<string name="keywords_display_brightness_level">dim screen, touchscreen, battery</string>
|
||||
<string name="keywords_display_auto_brightness">dim screen, touchscreen, battery</string>
|
||||
<string name="keywords_display_night_display">dim screen, night, tint</string>
|
||||
<string name="keywords_display_wallpaper">background, personalize, customize display</string>
|
||||
<string name="keywords_display_font_size">text size</string>
|
||||
<string name="keywords_display_cast_screen">project, cast</string>
|
||||
|
@@ -32,6 +32,12 @@
|
||||
settings:keywords="@string/keywords_display_auto_brightness"
|
||||
android:summary="@string/auto_brightness_summary" />
|
||||
|
||||
<com.android.settings.display.NightDisplayPreference
|
||||
android:key="night_display"
|
||||
android:title="@string/night_display_title"
|
||||
android:fragment="com.android.settings.display.NightDisplaySettings"
|
||||
settings:keywords="@string/keywords_display_night_display" />
|
||||
|
||||
<!-- Hide night mode for now
|
||||
<ListPreference
|
||||
android:key="night_mode"
|
||||
|
41
res/xml/night_display_settings.xml
Normal file
41
res/xml/night_display_settings.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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-auto"
|
||||
android:title="@string/night_display_title">
|
||||
|
||||
<DropDownPreference
|
||||
android:key="night_display_auto_mode"
|
||||
android:title="@string/night_display_auto_mode_title"
|
||||
android:persistent="false"
|
||||
android:summary="%s" />
|
||||
|
||||
<Preference
|
||||
android:key="night_display_start_time"
|
||||
android:title="@string/night_display_start_time_title" />
|
||||
|
||||
<Preference
|
||||
android:key="night_display_end_time"
|
||||
android:title="@string/night_display_end_time_title" />
|
||||
|
||||
<com.android.settings.fuelgauge.WallOfTextPreference
|
||||
android:summary="@string/night_display_text"
|
||||
android:selectable="false"
|
||||
settings:allowDividerAbove="true" />
|
||||
|
||||
</PreferenceScreen>
|
Reference in New Issue
Block a user