OSDN Git Service

Add auto battery saver suggestion notification/dialog
authorMakoto Onuki <omakoto@google.com>
Thu, 22 Mar 2018 17:43:03 +0000 (10:43 -0700)
committerMakoto Onuki <omakoto@google.com>
Tue, 27 Mar 2018 17:42:05 +0000 (10:42 -0700)
commit52c6295e22e6eb205300a5471c67ef26ae9466fa
treee445931ba171d242c1c4468756cc81baee2962b4
parentd52c532df7c7c481bf6e482c37f4e0ee02618fce
Add auto battery saver suggestion notification/dialog

Spec: go/ebs-low-battery-mode-flow

- Basically when the user manually enables battery saver 4 times,
we show this notification to suggest turning on "scheduled"
(i.e. auto) battery saver.

- We show it through 8th time. If the user hits "no thanks",
or if auto-saver is enabled already, we will not show it.

- Introduced a new notification channel "HINTS" with
IMPORTANCE_DEFAULT.

Bug: 74120126
Test: Manual test with ll development/scripts/battery_simulator.py

Change-Id: I713abc59dc7caee6882ba848c3e3aabaf778c2bd
core/java/android/provider/Settings.java
core/res/res/values/config.xml
core/res/res/values/symbols.xml
core/tests/coretests/src/android/provider/SettingsBackupTest.java
packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java
packages/SystemUI/res/values/strings.xml
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
packages/SystemUI/src/com/android/systemui/util/NotificationChannels.java
packages/SystemUI/tests/src/com/android/systemui/util/ChannelsTest.java
proto/src/system_messages.proto