From e349ec30d81096930a9cbabe125360245a98b7a0 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 25 May 2017 15:49:35 -0700 Subject: [PATCH] AOD: Ambient display settings to dedicated settings screen Bug: 33279975 Test: make RunSettingsRoboTests Change-Id: I5f3ddf3b3abfc989907293b4a47b78568c01cf9b --- res/values/strings.xml | 31 +++-- res/xml/ambient_display_settings.xml | 51 ++++++++ res/xml/display_settings.xml | 25 +--- src/com/android/settings/DisplaySettings.java | 20 +-- ...tDisplayAlwaysOnPreferenceController.java} | 11 +- ...layNotificationsPreferenceController.java} | 14 +-- .../AmbientDisplayPreferenceController.java | 64 ++++++++++ .../display/AmbientDisplaySettings.java | 107 ++++++++++++++++ .../search/SearchIndexableResources.java | 2 + .../hardware/AmbientDisplayConfiguration.java | 8 ++ ...playAlwaysOnPreferenceControllerTest.java} | 6 +- ...otificationsPreferenceControllerTest.java} | 10 +- ...mbientDisplayPreferenceControllerTest.java | 117 ++++++++++++++++++ .../search/DatabaseIndexingManagerTest.java | 4 +- 14 files changed, 402 insertions(+), 68 deletions(-) create mode 100644 res/xml/ambient_display_settings.xml rename src/com/android/settings/display/{DozeAlwaysOnPreferenceController.java => AmbientDisplayAlwaysOnPreferenceController.java} (82%) rename src/com/android/settings/display/{DozePreferenceController.java => AmbientDisplayNotificationsPreferenceController.java} (81%) create mode 100644 src/com/android/settings/display/AmbientDisplayPreferenceController.java create mode 100644 src/com/android/settings/display/AmbientDisplaySettings.java rename tests/robotests/src/com/android/settings/display/{DozeAlwaysOnPreferenceControllerTest.java => AmbientDisplayAlwaysOnPreferenceControllerTest.java} (93%) rename tests/robotests/src/com/android/settings/display/{DozePreferenceControllerTest.java => AmbientDisplayNotificationsPreferenceControllerTest.java} (91%) create mode 100644 tests/robotests/src/com/android/settings/display/AmbientDisplayPreferenceControllerTest.java diff --git a/res/values/strings.xml b/res/values/strings.xml index 546259c0919..846889f437c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -2424,9 +2424,18 @@ Automatic brightness Lift to wake - - Ambient display - + + + Ambient display + + Always on + + New notifications + + When to show + + New notifications + Wake screen when you receive notifications Always on @@ -8464,8 +8473,8 @@ Double-tap to check device - - To quickly check your notifications, double-tap your screen. + + To check time, notification icons, and other info, double-tap your screen. Lift to check phone @@ -8474,12 +8483,12 @@ Lift to check device - - To quickly check your notifications, pick up your phone. - - To quickly check your notifications, pick up your tablet. - - To quickly check your notifications, pick up your device. + + To check time, notification icons, and other info, pick up your phone. + + To check time, notification icons, and other info, pick up your tablet. + + To check time, notification icons, and other info, pick up your device. Swipe fingerprint for notifications diff --git a/res/xml/ambient_display_settings.xml b/res/xml/ambient_display_settings.xml new file mode 100644 index 00000000000..47fed8a8c5f --- /dev/null +++ b/res/xml/ambient_display_settings.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml index 749b87d377f..11b26769551 100644 --- a/res/xml/display_settings.xml +++ b/res/xml/display_settings.xml @@ -78,6 +78,11 @@ android:title="@string/screensaver_settings_title" android:fragment="com.android.settings.dream.DreamSettings" /> + +