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

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

Issue 371813005: [Android] Switch to DeviceUtils versions of Ls, SetJavaAsserts, GetProp, and SetProp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « build/android/pylib/device/device_utils_test.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | 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 404e99b37f3e2e85d7c66f7ccd0ae0bbf8e11a54..3612a81f66be947e1020da77f0fac43af555477c 100644
--- a/build/android/pylib/device_settings.py
+++ b/build/android/pylib/device_settings.py
@@ -26,22 +26,20 @@ def ConfigureContentSettingsDict(device, desired_settings):
settings to configure.
"""
try:
- sdk_version = int(device.old_interface.system_properties[
- 'ro.build.version.sdk'])
+ sdk_version = int(device.GetProp('ro.build.version.sdk'))
except ValueError:
logging.error('Skipping content settings configuration, unknown sdk %s',
- device.old_interface.system_properties[
- 'ro.build.version.sdk'])
+ device.GetProp('ro.build.version.sdk'))
return
if sdk_version < 16:
logging.error('Skipping content settings configuration due to outdated sdk')
return
- device.old_interface.system_properties['persist.sys.usb.config'] = 'adb'
+ device.SetProp('persist.sys.usb.config', 'adb')
device.old_interface.WaitForDevicePm()
- if device.old_interface.GetBuildType() == 'userdebug':
+ if device.GetProp('ro.build.type') == 'userdebug':
for table, key_value in sorted(desired_settings.iteritems()):
settings = content_settings.ContentSettings(table, device)
for key, value in key_value.iteritems():
@@ -71,7 +69,7 @@ def SetLockScreenSettings(device):
Exception if the setting was not properly set.
"""
if (not device.old_interface.FileExistsOnDevice(_LOCK_SCREEN_SETTINGS_PATH) or
- device.old_interface.GetBuildType() != 'userdebug'):
+ device.GetProp('ro.build.type') != 'userdebug'):
return
db = _LOCK_SCREEN_SETTINGS_PATH
« no previous file with comments | « build/android/pylib/device/device_utils_test.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698