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 df5f826ff0f205343e188a30d2f560d10c085221..682238cbe6d982530547222e3d7edea0e42f36f9 100644 |
--- a/build/android/pylib/device/battery_utils.py |
+++ b/build/android/pylib/device/battery_utils.py |
@@ -324,7 +324,9 @@ class BatteryUtils(object): |
device_errors.DeviceVersionError: If device is not L or higher. |
""" |
def battery_updates_enabled(): |
- return self.GetCharging() is True |
+ return (self.GetCharging() |
+ or not bool('UPDATES STOPPED' in self._device.RunShellCommand( |
+ ['dumpsys', 'battery'], check_return=True))) |
if (self._device.build_version_sdk < |
constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP): |