PowerUI: Don't play sound on every update below level.
There are many paths to update the power notification. Use PowerUI's playSound as a tripwire, and reset the value once applied. Bug:17253062 Change-Id: Ica6a4c621f7047f8b52dee82cbfe1db5bc08247e
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user