Commit cdeceac7 authored by navabi@google.com's avatar navabi@google.com

Only check if setup wizard is disabled if doing provision check.

The provision check checks if setup wizard is disabled. If the device status
check is run with no-provision-check, don't try to get read the status of the
setup wizard from the device.

The reason for the change is that checking the status of the setup wizard has
caused problems in certain cases (see the discussion on the bug). While the
particular issue can be fixed elsewhere, it is better to not check the status if
we are not going to use it.

BUG=255157
TBR=ilevy@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23503015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220696 0039d316-1c4b-4281-b951-d872f2087c98
parent 5da3f11b
......@@ -41,7 +41,6 @@ def DeviceInfo(serial, options):
device_build_type = device_adb.GetBuildType()
device_product_name = device_adb.GetProductName()
setup_wizard_disabled = device_adb.GetSetupWizardStatus() == 'DISABLED'
battery = device_adb.GetBatteryInfo()
install_output = GetCmdOutput(
['%s/build/android/adb_install_apk.py' % constants.DIR_SOURCE_ROOT, '--apk',
......@@ -76,9 +75,10 @@ def DeviceInfo(serial, options):
errors = []
if battery_level < 15:
errors += ['Device critically low in battery. Turning off device.']
if (not setup_wizard_disabled and device_build_type != 'user' and
not options.no_provisioning_check):
errors += ['Setup wizard not disabled. Was it provisioned correctly?']
if not options.no_provisioning_check:
setup_wizard_disabled = device_adb.GetSetupWizardStatus() == 'DISABLED'
if not setup_wizard_disabled and device_build_type != 'user':
errors += ['Setup wizard not disabled. Was it provisioned correctly?']
if device_product_name == 'mantaray' and ac_power != 'true':
errors += ['Mantaray device not connected to AC power.']
# TODO(navabi): Insert warning once we have a better handle of what install
......
......@@ -1109,7 +1109,8 @@ class AndroidCommands(object):
def GetSetupWizardStatus(self):
"""Returns the status of the device setup wizard (e.g. DISABLED)."""
status = self.RunShellCommand('getprop ro.setupwizard.mode')[0]
assert status
# On some devices, the status is empty if not otherwise set. In such cases
# the caller should expect an empty string to be returned.
return status
def StartMonitoringLogcat(self, clear=True, logfile=None, filters=None):
......
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