summaryrefslogtreecommitdiffstats
path: root/gallerycommon
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
commitcc8e7ab7ae0912186beff20e7f042fd6c1e78b35 (patch)
treeeeeb49abf25e08b31a5159be8f81ff5358e3c25d /gallerycommon
parent75a352ad80c698f8c0c3801b7e31b6795b93f955 (diff)
downloadandroid_packages_apps_Gallery2-cc8e7ab7ae0912186beff20e7f042fd6c1e78b35.tar.gz
android_packages_apps_Gallery2-cc8e7ab7ae0912186beff20e7f042fd6c1e78b35.tar.bz2
android_packages_apps_Gallery2-cc8e7ab7ae0912186beff20e7f042fd6c1e78b35.zip
Don't call Action.setLogo and Action.setHomeButtonEnabled in old API levels.
bug: 6706724 bug: 6706785 Change-Id: I09e48b8a042c5ce84442dddaf4e4bdfd1960ec4f
Diffstat (limited to 'gallerycommon')
-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);