summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com/android/gallery3d
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2012-06-27 19:01:21 +0800
committerOwen Lin <owenlin@google.com>2012-06-28 18:34:24 +0800
commit76bfd87c90c98a46c06ea67dd895fc8f016f7267 (patch)
tree655a460c009eb75cc1f7fefcd04e163616679f03 /gallerycommon/src/com/android/gallery3d
parent0c4c03a9fa2486d8021ad8f36067aa985aa2c85d (diff)
downloadandroid_packages_apps_Snap-76bfd87c90c98a46c06ea67dd895fc8f016f7267.tar.gz
android_packages_apps_Snap-76bfd87c90c98a46c06ea67dd895fc8f016f7267.tar.bz2
android_packages_apps_Snap-76bfd87c90c98a46c06ea67dd895fc8f016f7267.zip
Don't reuse bitmaps in BitmapRegionDecoder before JB.
Change-Id: I8a2f520f98116af6861fa2cd1460e6f848bbb4e4
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d')
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/ApiHelper.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
index 15026bbf3..c42c5fed6 100644
--- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
+++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
@@ -16,9 +16,12 @@
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 final boolean HAS_VIEW_SYSTEM_UI_FLAG_LAYOUT_STABLE =
@@ -30,6 +33,9 @@ public class ApiHelper {
public static final boolean HAS_MEDIA_COLUMNS_WIDTH_AND_HEIGHT =
hasField(MediaColumns.class, "WIDTH");
+ public static final boolean HAS_REUSING_BITMAP_IN_BITMAP_REGION_DECODER =
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN;
+
private static boolean hasField(Class<?> klass, String fieldName) {
try {
klass.getDeclaredField(fieldName);