diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-07-03 19:33:46 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2012-07-04 12:53:14 +0800 |
commit | a207d3326346d6da7b713d2be097a42a0401f354 (patch) | |
tree | 8223fccca4dc1006ae0d9da40bd910244571f742 /gallerycommon | |
parent | ca00c16c5a645e50e74bb82631128d408dc18788 (diff) | |
download | android_packages_apps_Snap-a207d3326346d6da7b713d2be097a42a0401f354.tar.gz android_packages_apps_Snap-a207d3326346d6da7b713d2be097a42a0401f354.tar.bz2 android_packages_apps_Snap-a207d3326346d6da7b713d2be097a42a0401f354.zip |
Use MTP only if the MTP API is available.
Change-Id: I5c747d0da2905eb344c56dfab6333034dd5eecc3
Diffstat (limited to 'gallerycommon')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/common/ApiHelper.java | 3 |
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 a908e1591..c1724a825 100644 --- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java +++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java @@ -54,6 +54,9 @@ public class ApiHelper { "android.graphics.SurfaceTexture", "setDefaultBufferSize", int.class, int.class); + public static final boolean HAS_MTP = + Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB_MR1; + private static boolean hasField(Class<?> klass, String fieldName) { try { klass.getDeclaredField(fieldName); |