Commit 134bec5e authored by navabi@google.com's avatar navabi@google.com

Do not use device if it had to be turned off because of critical battery level.

BUG=401098
TBR=rmcilroy@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#289512}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289512 0039d316-1c4b-4281-b951-d872f2087c98
parent 98ef0278
......@@ -81,8 +81,10 @@ def DeviceInfo(serial, options):
'']
errors = []
dev_good = True
if battery_level < 15:
errors += ['Device critically low in battery. Turning off device.']
dev_good = False
if not options.no_provisioning_check:
setup_wizard_disabled = (
device_adb.GetProp('ro.setupwizard.mode') == 'DISABLED')
......@@ -103,7 +105,7 @@ def DeviceInfo(serial, options):
logging.error(str(e))
device_adb.old_interface.Shutdown()
full_report = '\n'.join(report)
return device_type, device_build, battery_level, full_report, errors, True
return device_type, device_build, battery_level, full_report, errors, dev_good
def CheckForMissingDevices(options, adb_online_devs):
......
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