OG: reenable Omniswitch recents

Change-Id: Ifffade4b62cff130227c0ed607bbcb58d3ea2957
diff --git a/res/xml/button_settings.xml b/res/xml/button_settings.xml
index ae76ffb..081dbbe 100644
--- a/res/xml/button_settings.xml
+++ b/res/xml/button_settings.xml
@@ -253,13 +253,13 @@
     <PreferenceCategory
         android:key="button_other"
         android:title="@string/button_other_title" >
-<!--        <ListPreference
+        <ListPreference
             android:key="navbar_recents_style"
             android:title="@string/navbar_recents_style_title"
             android:entries="@array/navbar_recents_style_entries"
             android:entryValues="@array/navbar_recents_style_values"
             android:persistent="false"/>
--->
+
         <org.omnirom.omnigears.preference.SystemCheckBoxPreference
             android:key="button_back_kill_enable"
             android:title="@string/button_back_kill_enable_title"
diff --git a/src/org/omnirom/omnigears/ButtonSettings.java b/src/org/omnirom/omnigears/ButtonSettings.java
index 3497858..4f69fdd 100644
--- a/src/org/omnirom/omnigears/ButtonSettings.java
+++ b/src/org/omnirom/omnigears/ButtonSettings.java
@@ -95,7 +95,7 @@
     private static final String KEYS_BRIGHTNESS_KEY = "button_brightness";
     private static final String KEYS_SHOW_NAVBAR_KEY = "navigation_bar_show";
     private static final String KEYS_DISABLE_HW_KEY = "hardware_keys_disable";
-//    private static final String NAVIGATION_BAR_RECENTS_STYLE = "navbar_recents_style";
+    private static final String NAVIGATION_BAR_RECENTS_STYLE = "navbar_recents_style";
     private static final String BUTTON_BACK_KILL_TIMEOUT = "button_back_kill_timeout";
 
     // Available custom actions to perform on a key press.
@@ -110,7 +110,7 @@
 //    private static final int ACTION_LAST_APP = 8;
 //    private static final int ACTION_KILL_APP = 9;
 //    private static final int ACTION_SLEEP = 10;
-//    private static final int ACTION_OMNISWITCH = 11;
+    private static final int ACTION_OMNISWITCH = 11;
 
     // Masks for checking presence of hardware keys.
     // Must match values in frameworks/base/core/res/res/values/config.xml
@@ -137,7 +137,7 @@
 //    private ListPreference mAssistLongPressAction;
 //    private ListPreference mAppSwitchPressAction;
 //    private ListPreference mAppSwitchLongPressAction;
-//    private Map<String, Integer> mKeySettings = new HashMap<String, Integer>();
+    private Map<String, Integer> mKeySettings = new HashMap<String, Integer>();
 //    private ListPreference mVolumeDefault;
 //    private CheckBoxPreference mHeadsetHookLaunchVoice;
 //    private CheckBoxPreference mVirtualKeyHapticFeedback;
@@ -151,7 +151,7 @@
 //    private PreferenceCategory mKeysMenuCategory;
 //    private PreferenceCategory mKeysAppSwitchCategory;
 //    private PreferenceCategory mKeysAssistCategory;
-//    private ListPreference mNavbarRecentsStyle;
+    private ListPreference mNavbarRecentsStyle;
     private ListPreference mBackKillTimeout;
 
     @Override
@@ -468,14 +468,14 @@
             mDisabkeHWKeys.setChecked(harwareKeysDisable);
         }
 
-        /*mNavbarRecentsStyle = (ListPreference) findPreference(NAVIGATION_BAR_RECENTS_STYLE);
+        mNavbarRecentsStyle = (ListPreference) findPreference(NAVIGATION_BAR_RECENTS_STYLE);
         int recentsStyle = Settings.System.getInt(resolver,
                 Settings.System.NAVIGATION_BAR_RECENTS, 0);
 
         mNavbarRecentsStyle.setValue(Integer.toString(recentsStyle));
         mNavbarRecentsStyle.setSummary(mNavbarRecentsStyle.getEntry());
         mNavbarRecentsStyle.setOnPreferenceChangeListener(this);
-*/
+
         mBackKillTimeout = (ListPreference) findPreference(BUTTON_BACK_KILL_TIMEOUT);
         final int backKillTimeoutDefault = res.getInteger(com.android.internal.R.integer.config_backKillTimeout);
         final int backKillTimeout = Settings.System.getInt(resolver,
@@ -696,7 +696,7 @@
 //        } else if (preference == mVolumeDefault) {
 //            int value = Integer.valueOf((String) newValue);
 //            Settings.System.putInt(getContentResolver(), Settings.System.VOLUME_KEYS_DEFAULT, value);
-//            return true;
+//            return true; */
         } else if (preference == mNavbarRecentsStyle) {
             int value = Integer.valueOf((String) newValue);
             if (value == 1) {
@@ -709,7 +709,7 @@
             int index = mNavbarRecentsStyle.findIndexOfValue((String) newValue);
             mNavbarRecentsStyle.setSummary(mNavbarRecentsStyle.getEntries()[index]);
             Settings.System.putInt(getContentResolver(), Settings.System.NAVIGATION_BAR_RECENTS, value);
-            return true;*/
+            return true;
         } else if (preference == mBackKillTimeout) {
             int value = Integer.valueOf((String) newValue);
             int index = mBackKillTimeout.findIndexOfValue((String) newValue);
@@ -735,7 +735,7 @@
         }
         return false;
     }
-
+*/
     private boolean hasOmniSwitchKey() {
         Iterator<Integer> nextAction = mKeySettings.values().iterator();
         while (nextAction.hasNext()) {
@@ -746,7 +746,7 @@
         }
         return false;
     }
-
+/*
     private void checkForHomeKey() {
         if (!hasHomeKey()) {
             AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
@@ -762,7 +762,7 @@
             alertDialog.show();
         }
     }
-
+*/
     private void checkForOmniSwitchRecents() {
         if (hasOmniSwitchKey()) {
             if (!isOmniSwitchInstalled()){
@@ -830,7 +830,7 @@
     private boolean isOmniSwitchInstalled() {
         return PackageUtils.isAvailableApp(OmniSwitchConstants.APP_PACKAGE_NAME, getActivity());
     }
-*/
+
 
     private static class SummaryProvider implements SummaryLoader.SummaryProvider {
         private final Context mContext;