From ebea7a7e56937fbbb18cb0bfcd871af2ee4605fe Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Wed, 26 Oct 2016 12:51:26 -0700 Subject: [PATCH] AmbientDisplay: Add always on prototype Test: adb shell settings put secure doze_always_on 1 Change-Id: I3f293b3ef43847b7848af416b44f212fc40514d4 --- core/java/android/provider/Settings.java | 6 ++++ packages/SystemUI/res/values/strings.xml | 8 +++++ packages/SystemUI/res/xml/tuner_prefs.xml | 11 ++++++ .../com/android/systemui/doze/DozeHost.java | 1 + .../android/systemui/doze/DozeService.java | 36 ++++++++++++++++++- .../statusbar/phone/DozeParameters.java | 13 ++++--- .../statusbar/phone/DozeScrimController.java | 33 ++++++++++++++--- .../statusbar/phone/PhoneStatusBar.java | 17 +++++++-- .../statusbar/phone/StatusBarWindowView.java | 9 +++++ 9 files changed, 121 insertions(+), 13 deletions(-) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 03e0ebf32b70b..68b7b3a50514f 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -6000,6 +6000,12 @@ public final class Settings { */ public static final String DOZE_ENABLED = "doze_enabled"; + /** + * Whether doze should be always on. + * @hide + */ + public static final String DOZE_ALWAYS_ON = "doze_always_on"; + /** * Whether the device should pulse on pick up gesture. * @hide diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 1b7a922944867..d8c8b82eee4a7 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1667,6 +1667,14 @@ not appear on production builds ever. --> Plugins + + Ambient Display + + + Always on + Picture-in-Picture diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml index 46a9ee312b607..942f8472b7efb 100644 --- a/packages/SystemUI/res/xml/tuner_prefs.xml +++ b/packages/SystemUI/res/xml/tuner_prefs.xml @@ -139,6 +139,17 @@ + + + + + +