From 5ac8d5e3ce52ebdb42e997a8963a7827f15936f8 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Fri, 13 Apr 2018 15:53:57 -0700 Subject: [PATCH] Fix "auto battery saver notification comes back" Bug: 78017511 Test: Manual: - Run them: adb shell settings delete global low_power adb shell settings delete global low_power_sticky adb shell settings delete global low_power_trigger_level adb shell settings delete secure low_power_manual_activation_count adb shell settings delete secure low_power_warning_acknowledged adb shell settings delete secure suppress_auto_battery_saver_suggestion - Unplug - Toggle BS 4 times -> the "Tap to schedule battery saver" notification shows up - Dismiss the notification - Wait until the battery percent drops - Make sure the notification stays dismissed. Change-Id: I82cbd0110ab5d140c9e9b5b449577040e51032c6 --- .../com/android/systemui/power/PowerNotificationWarnings.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java index 40ce69b8e5800..d860fc52b97c9 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java @@ -533,6 +533,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { filter.addAction(ACTION_SHOW_AUTO_SAVER_SUGGESTION); filter.addAction(ACTION_ENABLE_AUTO_SAVER); filter.addAction(ACTION_AUTO_SAVER_NO_THANKS); + filter.addAction(ACTION_DISMISS_AUTO_SAVER_SUGGESTION); mContext.registerReceiverAsUser(this, UserHandle.ALL, filter, android.Manifest.permission.DEVICE_POWER, mHandler); }