From 0ab99c38f445619712942c86f2cd88a4b9ea9692 Mon Sep 17 00:00:00 2001 From: Wesley Wang Date: Fri, 25 Feb 2022 00:24:55 +0800 Subject: [PATCH] Update low battery notification mechanism - Update warning and severe trigger percentage - Update low battery notification trigger condition to fixed value instead of remaining time - Update low battery notification text - Update start saver confirmation notification text - Use severe low battery dialog if available Screenshot: https://screenshot.googleplex.com/iZt43YU6fHQPNpy.png Bug: 207470943 Bug: 209932572 Test: atest SystemUITests Change-Id: I851e635e748a5315f9780a1344c2068cda14d95e --- core/res/res/values/config.xml | 4 +- packages/SystemUI/res/values/config.xml | 3 ++ packages/SystemUI/res/values/strings.xml | 8 +++- .../power/PowerNotificationWarnings.java | 43 ++++++++++++------- .../com/android/systemui/power/PowerUI.java | 26 ++++------- .../android/systemui/power/PowerUITest.java | 6 --- 6 files changed, 49 insertions(+), 41 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 5ac30de631c50..c2cb57d84b34d 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1207,13 +1207,13 @@ - 5 + 10 680 - 15 + 20 15 diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 178f93ae3c935..3ed2170070815 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -482,6 +482,9 @@ space --> false + + false + - Battery may run out soon + Turn on Battery Saver? + + + You have %s battery left. Battery Saver turns on Dark theme, restricts background activity, and delays notifications. + + + Battery Saver turns on Dark theme, restricts background activity, and delays notifications.