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 |