| Index: build/android/provision_devices.py
|
| diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
|
| index a9c6cd8d192bb14883b95c51d99a33813e62eae7..1a7f9e02ec06d1a66a1ab2a5765448188a9eaf07 100755
|
| --- a/build/android/provision_devices.py
|
| +++ b/build/android/provision_devices.py
|
| @@ -336,11 +336,12 @@ def FinishProvisioning(device, options):
|
| device.SendKeyEvent(keyevent.KEYCODE_MENU)
|
|
|
| if options.min_battery_level is not None:
|
| + battery = battery_utils.BatteryUtils(device)
|
| try:
|
| - battery = battery_utils.BatteryUtils(device)
|
| battery.ChargeDeviceToLevel(options.min_battery_level)
|
| - except device_errors.CommandFailedError:
|
| - logging.exception('Unable to charge device to specified level.')
|
| + except device_errors.DeviceChargingError:
|
| + device.Reboot()
|
| + battery.ChargeDeviceToLevel(options.min_battery_level)
|
|
|
| if options.max_battery_temp is not None:
|
| try:
|
|
|