diff options
author | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-30 23:36:51 +0000 |
---|---|---|
committer | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-30 23:36:51 +0000 |
commit | cdeceac70ebaaa2e978c7ffb7e5848c14ac675e5 (patch) | |
tree | 2601d5cf6d20cf3f74d76560ee054441cc019fb9 | |
parent | 5da3f11b21c507c882f076703a6b6717ff7fd7d9 (diff) | |
download | chromium_src-cdeceac70ebaaa2e978c7ffb7e5848c14ac675e5.zip chromium_src-cdeceac70ebaaa2e978c7ffb7e5848c14ac675e5.tar.gz chromium_src-cdeceac70ebaaa2e978c7ffb7e5848c14ac675e5.tar.bz2 |
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
-rwxr-xr-x | build/android/buildbot/bb_device_status_check.py | 8 | ||||
-rw-r--r-- | build/android/pylib/android_commands.py | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/build/android/buildbot/bb_device_status_check.py b/build/android/buildbot/bb_device_status_check.py index ae0bb4a..9ce2b82 100755 --- a/build/android/buildbot/bb_device_status_check.py +++ b/build/android/buildbot/bb_device_status_check.py @@ -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 diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py index 5a031be..76c7076 100644 --- a/build/android/pylib/android_commands.py +++ b/build/android/pylib/android_commands.py @@ -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): |