diff options
Diffstat (limited to 'src/com/android/gallery3d/actionbar/ActionBarUtils.java')
-rw-r--r-- | src/com/android/gallery3d/actionbar/ActionBarUtils.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/actionbar/ActionBarUtils.java b/src/com/android/gallery3d/actionbar/ActionBarUtils.java index 22a3f9c9c..25ccb92b3 100644 --- a/src/com/android/gallery3d/actionbar/ActionBarUtils.java +++ b/src/com/android/gallery3d/actionbar/ActionBarUtils.java @@ -18,14 +18,20 @@ package com.android.gallery3d.actionbar; import android.app.Activity; +import com.android.gallery3d.common.ApiHelper; + public class ActionBarUtils { public static ActionBarInterface getActionBar(Activity activity) { - return new SystemActionBarWrapper(activity); + return ApiHelper.HAS_ACTION_BAR + ? new SystemActionBarWrapper(activity) + : new SimpleActionBar(activity); } public static ActionModeInterface startActionMode( Activity activity, ActionModeInterface.Callback callback) { - return new SystemActionModeWrapper(activity, callback); + return ApiHelper.HAS_ACTION_BAR + ? new SystemActionModeWrapper(activity, callback) + : new SimpleActionMode(); } } |