From c8c62ea8c9f27e9c06e671cad7ff4a7ab64bfa0f Mon Sep 17 00:00:00 2001 From: Owen Lin Date: Fri, 27 Jul 2012 11:46:50 +0800 Subject: Don't call Action.setLogo and Action.setHomeButtonEnabled in old API levels. bug: 6706724 bug: 6706785 Change-Id: I09e48b8a042c5ce84442dddaf4e4bdfd1960ec4f --- gallerycommon/src/com/android/gallery3d/common/ApiHelper.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gallerycommon') 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); -- cgit v1.2.3