Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ac8d5e3 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

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
parent d55a940e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
        }