Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3049)

Unified Diff: build/android/provision_devices.py

Issue 348673003: Add option to provision_devices script to disable location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/pylib/device_settings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/provision_devices.py
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
index 859fcbbe1ee207f1e3da26d2ce79cda92539624b..9f14a09f0b16b5796d48b419d7419db18da6e057 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -146,8 +146,12 @@ def ProvisionDevices(options):
device = device_utils.DeviceUtils(device_serial)
device.old_interface.EnableAdbRoot()
_ConfigureLocalProperties(device)
- device_settings.ConfigureContentSettingsDict(
- device, device_settings.DETERMINISTIC_DEVICE_SETTINGS)
+ device_settings_map = device_settings.DETERMINISTIC_DEVICE_SETTINGS
+ if options.disable_location:
+ device_settings_map.update(device_settings.DISABLE_LOCATION_SETTING)
+ else:
+ device_settings_map.update(device_settings.ENABLE_LOCATION_SETTING)
+ device_settings.ConfigureContentSettingsDict(device, device_settings_map)
if 'perf' in os.environ.get('BUILDBOT_BUILDERNAME', '').lower():
# TODO(tonyg): We eventually want network on. However, currently radios
# can cause perfbots to drain faster than they charge.
@@ -195,6 +199,8 @@ def main(argv):
parser = optparse.OptionParser()
parser.add_option('--skip-wipe', action='store_true', default=False,
help="Don't wipe device data during provisioning.")
+ parser.add_option('--disable-location', action='store_true', default=False,
+ help="Disallow Google location services on devices.")
parser.add_option('-d', '--device',
help='The serial number of the device to be provisioned')
parser.add_option('-t', '--target', default='Debug', help='The build target')
« no previous file with comments | « no previous file | build/android/pylib/device_settings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698