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

Unified Diff: devil/devil/android/battery_utils.py

Issue 1688813002: [Devil] Do not set charge level when charging devices. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: Created 4 years, 10 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 | devil/devil/android/battery_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/battery_utils.py
diff --git a/devil/devil/android/battery_utils.py b/devil/devil/android/battery_utils.py
index 32070bd6cd21ce0c2e62de0c8cddfdd7f8429616..ff0bd708ab1a32ad93b42ad06b195052d7b1c523 100644
--- a/devil/devil/android/battery_utils.py
+++ b/devil/devil/android/battery_utils.py
@@ -281,14 +281,6 @@ class BatteryUtils(object):
return {'system_total': system_total, 'per_package': per_package}
@decorators.WithTimeoutAndRetriesFromInstance()
- def _ForceResetBatteryInfo(self, timeout=None, retries=None):
- # Sometimes battery information stops updating. This kick starts it.
- self._device.RunShellCommand(['dumpsys', 'battery', 'set', 'level', '50'],
- check_return=True)
- self._device.RunShellCommand(['dumpsys', 'battery', 'reset'],
- check_return=True)
-
- @decorators.WithTimeoutAndRetriesFromInstance()
def GetBatteryInfo(self, timeout=None, retries=None):
"""Gets battery info for the device.
@@ -453,7 +445,6 @@ class BatteryUtils(object):
self.SetCharging(True)
def device_charged():
- self._ForceResetBatteryInfo()
battery_level = self.GetBatteryInfo().get('level')
if battery_level is None:
logging.warning('Unable to find current battery level.')
« no previous file with comments | « no previous file | devil/devil/android/battery_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698