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

Side by Side Diff: build/android/pylib/device_settings.py

Issue 434193002: [Android] Parallelize provision_devices.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 6
7 from pylib import content_settings 7 from pylib import content_settings
8 8
9 _LOCK_SCREEN_SETTINGS_PATH = '/data/system/locksettings.db' 9 _LOCK_SCREEN_SETTINGS_PATH = '/data/system/locksettings.db'
10 PASSWORD_QUALITY_UNSPECIFIED = '0' 10 PASSWORD_QUALITY_UNSPECIFIED = '0'
(...skipping 18 matching lines...) Expand all
29 sdk_version = int(device.GetProp('ro.build.version.sdk')) 29 sdk_version = int(device.GetProp('ro.build.version.sdk'))
30 except ValueError: 30 except ValueError:
31 logging.error('Skipping content settings configuration, unknown sdk %s', 31 logging.error('Skipping content settings configuration, unknown sdk %s',
32 device.GetProp('ro.build.version.sdk')) 32 device.GetProp('ro.build.version.sdk'))
33 return 33 return
34 34
35 if sdk_version < 16: 35 if sdk_version < 16:
36 logging.error('Skipping content settings configuration due to outdated sdk') 36 logging.error('Skipping content settings configuration due to outdated sdk')
37 return 37 return
38 38
39 device.SetProp('persist.sys.usb.config', 'adb')
40 device.old_interface.WaitForDevicePm()
41
42 if device.GetProp('ro.build.type') == 'userdebug': 39 if device.GetProp('ro.build.type') == 'userdebug':
43 for table, key_value in desired_settings: 40 for table, key_value in desired_settings:
44 settings = content_settings.ContentSettings(table, device) 41 settings = content_settings.ContentSettings(table, device)
45 for key, value in key_value: 42 for key, value in key_value:
46 settings[key] = value 43 settings[key] = value
47 logging.info('\n%s %s', table, (80 - len(table)) * '-') 44 logging.info('\n%s %s', table, (80 - len(table)) * '-')
48 for key, value in sorted(settings.iteritems()): 45 for key, value in sorted(settings.iteritems()):
49 logging.info('\t%s: %s', key, value) 46 logging.info('\t%s: %s', key, value)
50 47
51 48
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ('user_rotation', 0), 170 ('user_rotation', 0),
174 ]), 171 ]),
175 ] 172 ]
176 173
177 NETWORK_DISABLED_SETTINGS = [ 174 NETWORK_DISABLED_SETTINGS = [
178 ('settings/global', [ 175 ('settings/global', [
179 ('airplane_mode_on', 1), 176 ('airplane_mode_on', 1),
180 ('wifi_on', 0), 177 ('wifi_on', 0),
181 ]), 178 ]),
182 ] 179 ]
OLDNEW
« no previous file with comments | « build/android/pylib/device/device_blacklist.py ('k') | build/android/pylib/utils/parallelizer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698