summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2013-03-15 07:52:15 -0700
committerGeorge Mount <mount@google.com>2013-03-15 08:38:28 -0700
commitae08ffa53ee52fa78fe30d76865a05814d64984c (patch)
treeeab7c524241e6e36d71806fc5729f01cf2a9db54 /gallerycommon/src
parent2e47253cfb049943199faa43c04f77d0bab0b5ee (diff)
downloadandroid_packages_apps_Snap-ae08ffa53ee52fa78fe30d76865a05814d64984c.zip
android_packages_apps_Snap-ae08ffa53ee52fa78fe30d76865a05814d64984c.tar.gz
android_packages_apps_Snap-ae08ffa53ee52fa78fe30d76865a05814d64984c.tar.bz2
Use cancellationSignal only on API Level 16 and above.
Bug 8390238 Change-Id: If2dacb1eb74e531d004b6f281d32a81f7cd59139
Diffstat (limited to 'gallerycommon/src')
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/ApiHelper.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
index 13d48fd..b0b1fe0 100644
--- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
+++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java
@@ -185,6 +185,9 @@ public class ApiHelper {
public static final boolean HAS_ROTATION_ANIMATION =
hasField(WindowManager.LayoutParams.class, "rotationAnimation");
+ public static final boolean HAS_CANCELLATION_SIGNAL =
+ Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN;
+
public static int getIntFieldIfExists(Class<?> klass, String fieldName,
Class<?> obj, int defaultVal) {
try {