Android: fix battery status API charging state.
commit3fb3f9eddc122c4159315bc8f47936f034142201
authortimvolodine@chromium.org <timvolodine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 8 Aug 2014 15:00:31 +0000 (8 15:00 +0000)
committertimvolodine@chromium.org <timvolodine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 8 Aug 2014 15:01:46 +0000 (8 15:01 +0000)
treefcb48fe7a7d63ab972371eb6c0e804d92c6ca14e
parentdcd74902cfe8cfa6490f27859ea66cefdd762596
Android: fix battery status API charging state.

Define charging attribute in terms of whether the device is
plugged in or not. Previously it was defined in terms of
BATTERY_STATUS_DISCHARGING property but some phones report
BATTERY_STATUS_NOT_CHARGING when the battery is not charging.
Also modified the tests accordingly.

TEST=http://jsbin.com/battery-status-test
BUG=360068

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

Cr-Commit-Position: refs/heads/master@{#288361}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288361 0039d316-1c4b-4281-b951-d872f2087c98
content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java
content/public/android/javatests/src/org/chromium/content/browser/BatteryStatusManagerTest.java