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

Unified Diff: build/android/pylib/device_settings.py

Issue 1428543004: [Android] Attempt to set device settings on eng builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device_settings.py
diff --git a/build/android/pylib/device_settings.py b/build/android/pylib/device_settings.py
index e42d9289e95a5ef459f04d7715235287e448031c..1147c0242840cf2a7ac9298e233a06fb46f563ad 100644
--- a/build/android/pylib/device_settings.py
+++ b/build/android/pylib/device_settings.py
@@ -10,6 +10,7 @@ _LOCK_SCREEN_SETTINGS_PATH = '/data/system/locksettings.db'
_ALTERNATE_LOCK_SCREEN_SETTINGS_PATH = (
'/data/data/com.android.providers.settings/databases/settings.db')
PASSWORD_QUALITY_UNSPECIFIED = '0'
+_COMPATIBLE_BUILD_TYPES = ['userdebug', 'eng']
def ConfigureContentSettings(device, desired_settings):
@@ -27,7 +28,7 @@ def ConfigureContentSettings(device, desired_settings):
desired_settings: A list of (table, [(key: value), ...]) for all
settings to configure.
"""
- if device.build_type == 'userdebug':
+ if device.build_type in _COMPATIBLE_BUILD_TYPES:
for table, key_value in desired_settings:
settings = content_settings.ContentSettings(table, device)
for key, value in key_value:
@@ -56,8 +57,9 @@ def SetLockScreenSettings(device):
Raises:
Exception if the setting was not properly set.
"""
- if device.build_type != 'userdebug':
- logging.warning('Unable to disable lockscreen on user builds.')
+ if device.build_type not in _COMPATIBLE_BUILD_TYPES:
+ logging.warning('Unable to disable lockscreen on %s builds.',
+ device.build_type)
return
def get_lock_settings(table):
« 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