summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com/android/gallery3d/common
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2012-07-27 11:46:50 +0800
committerOwen Lin <owenlin@google.com>2012-07-30 16:04:27 +0800
commitc8c62ea8c9f27e9c06e671cad7ff4a7ab64bfa0f (patch)
treee96b6061cff16949fc9dfd8c8dfa65c414adb296 /gallerycommon/src/com/android/gallery3d/common
parentc775e7fa64a08a55ae8286643157e2534cf34d45 (diff)
downloadandroid_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/android/gallery3d/common')
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/ApiHelper.java6
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);