summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Spurlock <jspurlock@google.com> 2014-08-25 19:59:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-08-25 20:00:01 +0000
commitfaa9fb8b6acce28c8edf0ebc84043e2ca6e41d7d (patch)
tree82c2e668c20eeedde613255747d60c7cfdbf0f02
parentf93afcf195bf4f42819977623a1f68ee8eaf90ae (diff)
parent7290d192c8a0c1a19ef3c298f2eeab63e82190a8 (diff)
Merge "PowerUI: Don't play sound on every update below level." into lmp-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index bd1ef7ab57a4..4c7f8ec8f9cf 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -193,6 +193,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
}
if (mPlaySound) {
attachLowBatterySound(nb);
+ mPlaySound = false;
}
final Notification n = nb.build();
if (n.headsUpContentView != null) {
@@ -283,7 +284,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
public void showLowBatteryWarning(boolean playSound) {
Slog.i(TAG,
"show low battery warning: level=" + mBatteryLevel
- + " [" + mBucket + "]");
+ + " [" + mBucket + "] playSound=" + playSound);
mPlaySound = playSound;
mWarning = true;
updateNotification();