diff options
author | Owen Lin <owenlin@google.com> | 2012-06-22 12:31:33 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2012-06-22 18:14:49 +0800 |
commit | 40228b9d0ac27ae47c30d8fbcf6c253de707b71b (patch) | |
tree | d34175f9aa746c54418b48731ffdfb2fea412f17 /gallerycommon/src/com/android/gallery3d/common | |
parent | 5d095edd840841440b029b4adc6e4fc2261d9bd6 (diff) | |
download | android_packages_apps_Snap-40228b9d0ac27ae47c30d8fbcf6c253de707b71b.tar.gz android_packages_apps_Snap-40228b9d0ac27ae47c30d8fbcf6c253de707b71b.tar.bz2 android_packages_apps_Snap-40228b9d0ac27ae47c30d8fbcf6c253de707b71b.zip |
Use MediaColumns.WIDTH and MediaColumns.HEIGHT only when they are available.
bug:6698720
Change-Id: Iaabfd1d5fe16b5d89f564d688a78e773ad36c8bd
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/common')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/common/ApiHelper.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java index 2fa93b9e9..15026bbf3 100644 --- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java +++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java @@ -16,6 +16,7 @@ package com.android.gallery3d.common; +import android.provider.MediaStore.MediaColumns; import android.view.View; public class ApiHelper { @@ -26,6 +27,9 @@ public class ApiHelper { public static final boolean HAS_VIEW_SYSTEM_UI_FLAG_HIDE_NAVIGATION = hasField(View.class, "SYSTEM_UI_FLAG_HIDE_NAVIGATION"); + public static final boolean HAS_MEDIA_COLUMNS_WIDTH_AND_HEIGHT = + hasField(MediaColumns.class, "WIDTH"); + private static boolean hasField(Class<?> klass, String fieldName) { try { klass.getDeclaredField(fieldName); |