Merge "Update low battery notification logging timing" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cb41788177
@@ -307,6 +307,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|
|||||||
.setContentText(contentText)
|
.setContentText(contentText)
|
||||||
.setContentTitle(title)
|
.setContentTitle(title)
|
||||||
.setOnlyAlertOnce(true)
|
.setOnlyAlertOnce(true)
|
||||||
|
.setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING))
|
||||||
.setStyle(new Notification.BigTextStyle().bigText(contentText))
|
.setStyle(new Notification.BigTextStyle().bigText(contentText))
|
||||||
.setVisibility(Notification.VISIBILITY_PUBLIC);
|
.setVisibility(Notification.VISIBILITY_PUBLIC);
|
||||||
if (hasBatterySettings()) {
|
if (hasBatterySettings()) {
|
||||||
@@ -333,7 +334,6 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|
|||||||
final Notification n = nb.build();
|
final Notification n = nb.build();
|
||||||
mNoMan.cancelAsUser(TAG_BATTERY, SystemMessage.NOTE_BAD_CHARGER, UserHandle.ALL);
|
mNoMan.cancelAsUser(TAG_BATTERY, SystemMessage.NOTE_BAD_CHARGER, UserHandle.ALL);
|
||||||
mNoMan.notifyAsUser(TAG_BATTERY, SystemMessage.NOTE_POWER_LOW, n, UserHandle.ALL);
|
mNoMan.notifyAsUser(TAG_BATTERY, SystemMessage.NOTE_POWER_LOW, n, UserHandle.ALL);
|
||||||
logEvent(BatteryWarningEvents.LowBatteryWarningEvent.LOW_BATTERY_NOTIFICATION);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean showSevereLowBatteryDialog() {
|
private boolean showSevereLowBatteryDialog() {
|
||||||
@@ -615,6 +615,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
|
|||||||
Slog.i(TAG,
|
Slog.i(TAG,
|
||||||
"show low battery warning: level=" + mBatteryLevel
|
"show low battery warning: level=" + mBatteryLevel
|
||||||
+ " [" + mBucket + "] playSound=" + playSound);
|
+ " [" + mBucket + "] playSound=" + playSound);
|
||||||
|
logEvent(BatteryWarningEvents.LowBatteryWarningEvent.LOW_BATTERY_NOTIFICATION);
|
||||||
mPlaySound = playSound;
|
mPlaySound = playSound;
|
||||||
mWarning = true;
|
mWarning = true;
|
||||||
updateNotification();
|
updateNotification();
|
||||||
|
|||||||
Reference in New Issue
Block a user