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

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

Issue 294253004: Disable media transfer protocol on android devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 def ConfigureContentSettingsDict(device, desired_settings): 10 def ConfigureContentSettingsDict(device, desired_settings):
(...skipping 17 matching lines...) Expand all
28 except ValueError: 28 except ValueError:
29 logging.error('Skipping content settings configuration, unknown sdk %s', 29 logging.error('Skipping content settings configuration, unknown sdk %s',
30 device.old_interface.system_properties[ 30 device.old_interface.system_properties[
31 'ro.build.version.sdk']) 31 'ro.build.version.sdk'])
32 return 32 return
33 33
34 if sdk_version < 16: 34 if sdk_version < 16:
35 logging.error('Skipping content settings configuration due to outdated sdk') 35 logging.error('Skipping content settings configuration due to outdated sdk')
36 return 36 return
37 37
38 device.old_interface.system_properties['persist.sys.usb.config'] = 'adb'
39 device.old_interface.WaitForDevicePm()
40
38 for table, key_value in sorted(desired_settings.iteritems()): 41 for table, key_value in sorted(desired_settings.iteritems()):
39 settings = content_settings.ContentSettings(table, device) 42 settings = content_settings.ContentSettings(table, device)
40 for key, value in key_value.iteritems(): 43 for key, value in key_value.iteritems():
41 settings[key] = value 44 settings[key] = value
42 logging.info('\n%s %s', table, (80 - len(table)) * '-') 45 logging.info('\n%s %s', table, (80 - len(table)) * '-')
43 for key, value in sorted(settings.iteritems()): 46 for key, value in sorted(settings.iteritems()):
44 logging.info('\t%s: %s', key, value) 47 logging.info('\t%s: %s', key, value)
45 48
46 49
47 DETERMINISTIC_DEVICE_SETTINGS = { 50 DETERMINISTIC_DEVICE_SETTINGS = {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 }, 105 },
103 } 106 }
104 107
105 108
106 NETWORK_DISABLED_SETTINGS = { 109 NETWORK_DISABLED_SETTINGS = {
107 'settings/global': { 110 'settings/global': {
108 'airplane_mode_on': 1, 111 'airplane_mode_on': 1,
109 'wifi_on': 0, 112 'wifi_on': 0,
110 }, 113 },
111 } 114 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698