Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: ash/system/chromeos/power/tray_power.cc

Issue 15993020: REVERTED cros: Update charging not reliable battery status (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comment Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/chromeos/power/power_status_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 64f33f2d335a5874ca939b74bc501dee65f6b28d..7206fbe2154c3601fa568b042950cf0116d88186 100644
--- a/ash/system/chromeos/power/tray_power.cc
+++ b/ash/system/chromeos/power/tray_power.cc
@@ -217,11 +217,12 @@ TrayPower::~TrayPower() {
// static
bool TrayPower::IsBatteryChargingUnreliable(
const chromeos::PowerSupplyStatus& supply_status) {
- return
- supply_status.battery_state ==
- PowerSupplyStatus::NEITHER_CHARGING_NOR_DISCHARGING ||
- supply_status.battery_state ==
- PowerSupplyStatus::CONNECTED_TO_USB;
+ // Sometimes devices can get into a state where the battery is almost fully
+ // charged and the power subsystem reports "neither charging nor discharging"
+ // despite the battery not at 100%. For now, only report unreliable charging
+ // on USB.
+ // TODO(derat): Update this when the power manager code is refactored for M29.
+ return supply_status.battery_state == PowerSupplyStatus::CONNECTED_TO_USB;
}
// static
« no previous file with comments | « ash/system/chromeos/power/power_status_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698