Chromium Code Reviews| Index: ash/system/chromeos/power/tray_power.cc |
| diff --git a/ash/system/chromeos/power/tray_power.cc b/ash/system/chromeos/power/tray_power.cc |
| index 8bc68d5ec4e9506a16076a88bd6447baf4275d84..1dedf4896e8102f4f5ece199ad5254dcb2f5aa26 100644 |
| --- a/ash/system/chromeos/power/tray_power.cc |
| +++ b/ash/system/chromeos/power/tray_power.cc |
| @@ -233,7 +233,8 @@ bool TrayPower::UpdateNotificationState() { |
| const PowerStatus& status = *PowerStatus::Get(); |
| if (!status.IsBatteryPresent() || |
| status.IsBatteryTimeBeingCalculated() || |
| - status.IsMainsChargerConnected()) { |
| + status.IsMainsChargerConnected() || |
| + status.IsOriginalSpringChargerConnected()) { |
|
jennyz
2014/01/27 18:03:37
what if the user confirms they are using the safe
|
| notification_state_ = NOTIFICATION_NONE; |
| return false; |
| } |
| @@ -249,7 +250,8 @@ bool TrayPower::UpdateNotificationStateForRemainingTime() { |
| const int remaining_minutes = static_cast<int>( |
| PowerStatus::Get()->GetBatteryTimeToEmpty().InSecondsF() / 60.0 + 0.5); |
| - if (remaining_minutes >= kNoWarningMinutes) { |
| + if (remaining_minutes >= kNoWarningMinutes || |
| + PowerStatus::Get()->IsBatteryFull()) { |
|
Daniel Erat
2014/01/27 17:36:26
These IsBatteryFull() checks aren't necessary for
jennyz
2014/01/27 18:03:37
agree.
|
| notification_state_ = NOTIFICATION_NONE; |
| return false; |
| } |
| @@ -284,7 +286,8 @@ bool TrayPower::UpdateNotificationStateForRemainingPercentage() { |
| const int remaining_percentage = |
| PowerStatus::Get()->GetRoundedBatteryPercent(); |
| - if (remaining_percentage >= kNoWarningPercentage) { |
| + if (remaining_percentage >= kNoWarningPercentage || |
| + PowerStatus::Get()->IsBatteryFull()) { |
| notification_state_ = NOTIFICATION_NONE; |
| return false; |
| } |