Revert 203952 "cros: Update charging not reliable battery status"

> cros: Update charging not reliable battery status
> 
> Don't display the "charging not reliable" battery status in the 
> non-charging-non-discharging state, as that can happen normally in
> some circumstances. Also, update the string to be more human-friendly.
> 
> BUG=246336
> TEST=manual, see bug
> 
> Review URL: https://chromiumcodereview.appspot.com/16057022

TBR=jamescook@chromium.org

Review URL: https://codereview.chromium.org/16226023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203989 0039d316-1c4b-4281-b951-d872f2087c98
parent 1035fae9
......@@ -426,7 +426,7 @@ Press Shift + Alt to switch.
<ph name="hour">$1<ex>2</ex></ph>:<ph name="minute">$2<ex>53</ex></ph> until full
</message>
<message name="IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE" desc="The label in the tray dialog to indicate that battery charging is unreliable.">
Low-power charger
Charging not reliable
</message>
<message name="IDS_ASH_STATUS_TRAY_BATTERY_FULL_CHARGE_ACCESSIBLE" desc="The message used by accessibility to show battery is full and charging.">
Battery is full and charging.
......@@ -450,7 +450,7 @@ Press Shift + Alt to switch.
<ph name="hour">$1<ex> 1 hour</ex></ph> and <ph name="minute">$2<ex>15 minutes</ex></ph>
</message>
<message name="IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE_ACCESSIBLE" desc="The message used by accessibility to indicate that battery charging is unreliable.">
Plugged in to a low-power charger. Battery charging may not be reliable.
Plugged in to a non-standard power supply. Battery charging may not be reliable.
</message>
<message name="IDS_ASH_STATUS_TRAY_HELP" desc="The accessible text for the help button.">
Help
......
......@@ -217,12 +217,11 @@ TrayPower::~TrayPower() {
// static
bool TrayPower::IsBatteryChargingUnreliable(
const chromeos::PowerSupplyStatus& supply_status) {
// 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;
return
supply_status.battery_state ==
PowerSupplyStatus::NEITHER_CHARGING_NOR_DISCHARGING ||
supply_status.battery_state ==
PowerSupplyStatus::CONNECTED_TO_USB;
}
// static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment