diff options
author | Owen Lin <owenlin@google.com> | 2012-06-28 11:10:02 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2012-06-28 18:35:03 +0800 |
commit | bfe478b2fdbc3526ce465a18b30fe5195fa1fe8a (patch) | |
tree | 2dbca953a5f0ccb9fd67a0146ad900b5eec9b8a1 /gallerycommon/src | |
parent | d09121f9fb7cf571a6b71c4174835dd4b7359595 (diff) | |
download | android_packages_apps_Snap-bfe478b2fdbc3526ce465a18b30fe5195fa1fe8a.tar.gz android_packages_apps_Snap-bfe478b2fdbc3526ce465a18b30fe5195fa1fe8a.tar.bz2 android_packages_apps_Snap-bfe478b2fdbc3526ce465a18b30fe5195fa1fe8a.zip |
Don't use Build.VERSION_CODES.
Since they won't be available on old platform.
bug: 6752318
Change-Id: I55a9e83dbf05b93c83c68cb31f6edcbc29793283
Diffstat (limited to 'gallerycommon/src')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/common/ApiHelper.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java index c42c5fed6..85b092576 100644 --- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java +++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java @@ -16,13 +16,21 @@ package com.android.gallery3d.common; -import android.annotation.TargetApi; import android.os.Build; import android.provider.MediaStore.MediaColumns; import android.view.View; -@TargetApi(Build.VERSION_CODES.JELLY_BEAN) public class ApiHelper { + public static interface VERSION_CODES { + // These value are copied from Build.VERSION_CODES + public static final int GINGERBREAD_MR1 = 10; + public static final int HONEYCOMB = 11; + public static final int HONEYCOMB_MR1 = 12; + public static final int HONEYCOMB_MR2 = 13; + public static final int ICE_CREAM_SANDWICH = 14; + public static final int ICE_CREAM_SANDWICH_MR1 = 15; + public static final int JELLY_BEAN = 16; + } public static final boolean HAS_VIEW_SYSTEM_UI_FLAG_LAYOUT_STABLE = hasField(View.class, "SYSTEM_UI_FLAG_LAYOUT_STABLE"); @@ -34,7 +42,7 @@ public class ApiHelper { hasField(MediaColumns.class, "WIDTH"); public static final boolean HAS_REUSING_BITMAP_IN_BITMAP_REGION_DECODER = - Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; + Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN; private static boolean hasField(Class<?> klass, String fieldName) { try { |