From b7cc5e99563bc695ec871f897914eb2cb797ad53 Mon Sep 17 00:00:00 2001 From: George Mount Date: Fri, 15 Mar 2013 07:52:15 -0700 Subject: Use cancellationSignal only on API Level 16 and above. Bug 8390238 Change-Id: If2dacb1eb74e531d004b6f281d32a81f7cd59139 --- gallerycommon/src/com/android/gallery3d/common/ApiHelper.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gallerycommon/src/com/android/gallery3d') diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java index 13d48fd2c..b0b1fe070 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 { -- cgit v1.2.3