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

Unified Diff: build/android/pylib/device/battery_utils.py

Issue 1153143007: [Android] Force enable battery updates instead of resetting to clear power data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | build/android/pylib/device/battery_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/battery_utils.py
diff --git a/build/android/pylib/device/battery_utils.py b/build/android/pylib/device/battery_utils.py
index ed66591daa5c6ac2df287ffaca938020d47fa37e..2eab9f2fc4476e989b174a680e52e6881c1760d5 100644
--- a/build/android/pylib/device/battery_utils.py
+++ b/build/android/pylib/device/battery_utils.py
@@ -289,7 +289,9 @@ class BatteryUtils(object):
raise device_errors.DeviceVersionError('Device must be L or higher.')
self._device.RunShellCommand(
- ['dumpsys', 'battery', 'reset'], check_return=True)
jbudorick 2015/06/09 18:29:16 Is there anything covered by reset that isn't cove
rnephew (Reviews Here) 2015/06/09 19:07:29 The only purpose of the reset here is to make sure
jbudorick 2015/06/09 19:09:45 I take it that the dumpsys battery reset in Enable
+ ['dumpsys', 'battery', 'set', 'usb', '1'], check_return=True)
+ self._device.RunShellCommand(
+ ['dumpsys', 'battery', 'set', 'ac', '1'], check_return=True)
self._device.RunShellCommand(
['dumpsys', 'batterystats', '--reset'], check_return=True)
battery_data = self._device.RunShellCommand(
« no previous file with comments | « no previous file | build/android/pylib/device/battery_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698