OSDN Git Service

Use cancellationSignal only on API Level 16 and above.
[android-x86/packages-apps-Gallery2.git] / gallerycommon / src / com / android / gallery3d / common / ApiHelper.java
index 13d48fd..b0b1fe0 100644 (file)
@@ -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 {