| OLD | NEW |
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 cmd = """begin transaction; | 86 cmd = """begin transaction; |
| 87 delete from '%(table)s' where %(primary_key)s='%(primary_value)s'; | 87 delete from '%(table)s' where %(primary_key)s='%(primary_value)s'; |
| 88 insert into '%(table)s' (%(columns)s) values (%(values)s); | 88 insert into '%(table)s' (%(columns)s) values (%(values)s); |
| 89 commit transaction;""" % { | 89 commit transaction;""" % { |
| 90 'table': table, | 90 'table': table, |
| 91 'primary_key': columns[0], | 91 'primary_key': columns[0], |
| 92 'primary_value': values[0], | 92 'primary_value': values[0], |
| 93 'columns': ', '.join(columns), | 93 'columns': ', '.join(columns), |
| 94 'values': ', '.join(["'%s'" % value for value in values]) | 94 'values': ', '.join(["'%s'" % value for value in values]) |
| 95 } | 95 } |
| 96 output_msg = device.RunShellCommand('\'sqlite3 %s "%s"\'' % (db, cmd)) | 96 output_msg = device.RunShellCommand('sqlite3 %s "%s"' % (db, cmd)) |
| 97 if output_msg: | 97 if output_msg: |
| 98 print ' '.join(output_msg) | 98 print ' '.join(output_msg) |
| 99 | 99 |
| 100 | 100 |
| 101 ENABLE_LOCATION_SETTING = { | 101 ENABLE_LOCATION_SETTING = { |
| 102 'settings/secure': { | 102 'settings/secure': { |
| 103 # Ensure Geolocation is enabled and allowed for tests. | 103 # Ensure Geolocation is enabled and allowed for tests. |
| 104 'location_providers_allowed': 'gps,network', | 104 'location_providers_allowed': 'gps,network', |
| 105 } | 105 } |
| 106 } | 106 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 }, | 167 }, |
| 168 } | 168 } |
| 169 | 169 |
| 170 | 170 |
| 171 NETWORK_DISABLED_SETTINGS = { | 171 NETWORK_DISABLED_SETTINGS = { |
| 172 'settings/global': { | 172 'settings/global': { |
| 173 'airplane_mode_on': 1, | 173 'airplane_mode_on': 1, |
| 174 'wifi_on': 0, | 174 'wifi_on': 0, |
| 175 }, | 175 }, |
| 176 } | 176 } |
| OLD | NEW |