[Android] Move battery & temperature waits after the second reboot.
BUG=506232 Review URL: https://codereview.chromium.org/1218173004 Cr-Original-Commit-Position: refs/heads/master@{#337051} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: f9f6af8d569eb08799dea82386b0fa2e18b7d8b5
This commit is contained in:
Родитель
c7ee12d8b3
Коммит
91485006ba
|
@ -182,20 +182,6 @@ def SetProperties(device, options):
|
|||
device_settings.ConfigureContentSettings(
|
||||
device, device_settings.NETWORK_DISABLED_SETTINGS)
|
||||
|
||||
if options.min_battery_level is not None:
|
||||
try:
|
||||
battery = battery_utils.BatteryUtils(device)
|
||||
battery.ChargeDeviceToLevel(options.min_battery_level)
|
||||
except device_errors.CommandFailedError as e:
|
||||
logging.exception('Unable to charge device to specified level.')
|
||||
|
||||
if options.max_battery_temp is not None:
|
||||
try:
|
||||
battery = battery_utils.BatteryUtils(device)
|
||||
battery.LetBatteryCoolToTemperature(options.max_battery_temp)
|
||||
except device_errors.CommandFailedError as e:
|
||||
logging.exception('Unable to let battery cool to specified temperature.')
|
||||
|
||||
def _ConfigureLocalProperties(device, java_debug=True):
|
||||
"""Set standard readonly testing device properties prior to reboot."""
|
||||
local_props = [
|
||||
|
@ -222,6 +208,20 @@ def _ConfigureLocalProperties(device, java_debug=True):
|
|||
|
||||
|
||||
def FinishProvisioning(device, options):
|
||||
if options.min_battery_level is not None:
|
||||
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.')
|
||||
|
||||
if options.max_battery_temp is not None:
|
||||
try:
|
||||
battery = battery_utils.BatteryUtils(device)
|
||||
battery.LetBatteryCoolToTemperature(options.max_battery_temp)
|
||||
except device_errors.CommandFailedError:
|
||||
logging.exception('Unable to let battery cool to specified temperature.')
|
||||
|
||||
device.RunShellCommand(
|
||||
['date', '-s', time.strftime('%Y%m%d.%H%M%S', time.gmtime())],
|
||||
as_root=True, check_return=True)
|
||||
|
|
Загрузка…
Ссылка в новой задаче