diff options
author | Owen Lin <owenlin@google.com> | 2012-07-27 11:46:50 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2012-07-30 16:04:27 +0800 |
commit | c8c62ea8c9f27e9c06e671cad7ff4a7ab64bfa0f (patch) | |
tree | e96b6061cff16949fc9dfd8c8dfa65c414adb296 /gallerycommon/src/com | |
parent | c775e7fa64a08a55ae8286643157e2534cf34d45 (diff) | |
download | android_packages_apps_Snap-c8c62ea8c9f27e9c06e671cad7ff4a7ab64bfa0f.tar.gz android_packages_apps_Snap-c8c62ea8c9f27e9c06e671cad7ff4a7ab64bfa0f.tar.bz2 android_packages_apps_Snap-c8c62ea8c9f27e9c06e671cad7ff4a7ab64bfa0f.zip |
Don't call Action.setLogo and Action.setHomeButtonEnabled in old API levels.
bug: 6706724
bug: 6706785
Change-Id: I09e48b8a042c5ce84442dddaf4e4bdfd1960ec4f
Diffstat (limited to 'gallerycommon/src/com')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/common/ApiHelper.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java index 0d349f386..c46d90a65 100644 --- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java +++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java @@ -128,6 +128,12 @@ public class ApiHelper { public static final boolean HAS_SET_ICON_ATTRIBUTE = Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB; + public static final boolean HAS_ACTION_BAR_SET_LOGO = + Build.VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH; + + public static final boolean HAS_ACTION_BAR_SET_HOME_BUTTON_ENABLED = + Build.VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH; + private static boolean hasField(Class<?> klass, String fieldName) { try { klass.getDeclaredField(fieldName); |