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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/constants.py ('k') | build/android/pylib/device/adb_wrapper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/content_settings.py
diff --git a/build/android/pylib/content_settings.py b/build/android/pylib/content_settings.py
index f00553f18165cfcab3ef8f6ed5bfd80726de1db7..f039c969ea04337e491f8c033860d7631ceaf190 100644
--- a/build/android/pylib/content_settings.py
+++ b/build/android/pylib/content_settings.py
@@ -14,13 +14,9 @@ class ContentSettings(dict):
def __init__(self, table, device):
super(ContentSettings, self).__init__()
- sdk_version_string = device.GetProp('ro.build.version.sdk')
- try:
- sdk_version = int(sdk_version_string)
- assert sdk_version >= constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN, (
- 'ContentSettings supported only on SDK 16 and later')
- except ValueError:
- assert False, ('Unknown SDK version %s' % sdk_version_string)
+ assert (device.build_version_sdk
+ >= constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN), (
+ 'ContentSettings supported only on SDK 16 and later')
self._table = table
self._device = device
« no previous file with comments | « build/android/pylib/constants.py ('k') | build/android/pylib/device/adb_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698