OmniGears: recents style is a global option
Change-Id: I87233ad1a1307e9f15c8e80e17a8102e6f204b84
diff --git a/res/values/custom_arrays.xml b/res/values/custom_arrays.xml
index 8b5677b..31ffdb8 100644
--- a/res/values/custom_arrays.xml
+++ b/res/values/custom_arrays.xml
@@ -149,8 +149,8 @@
</string-array>
<string-array name="navbar_recents_style_entries" translatable="false">
- <item>@string/keys_action_app_switch</item>
- <item>@string/keys_action_omniswitch</item>
+ <item>@string/keys_action_app_switch_short</item>
+ <item>@string/keys_action_omniswitch_short</item>
</string-array>
<string-array name="navbar_recents_style_values" translatable="false">
diff --git a/res/values/custom_strings.xml b/res/values/custom_strings.xml
index 7ffeff3..d11cc8b 100644
--- a/res/values/custom_strings.xml
+++ b/res/values/custom_strings.xml
@@ -41,7 +41,7 @@
<string name="keys_app_switch_long_press_title">App switch key (long press)</string>
<string name="keys_action_nothing">No action</string>
<string name="keys_action_menu">Open/close menu</string>
- <string name="keys_action_app_switch">AOSP recents</string>
+ <string name="keys_action_app_switch">Default recents</string>
<string name="keys_action_search">Search assistant</string>
<string name="keys_action_voice_search">Voice search</string>
<string name="keys_action_in_app_search">In-app search</string>
@@ -63,6 +63,9 @@
<string name="button_home_wake_summary">Pressing the home button will wake the device</string>
<string name="button_home_answers_call_title">Button answers call</string>
<string name="button_home_answers_call_summary">Pressing the home button will answer incoming call</string>
+ <string name="button_other_title">Recents</string>
+ <string name="keys_action_app_switch_short">Default</string>
+ <string name="keys_action_omniswitch_short">OmniSwitch</string>
<!-- Doze pulse (ambient display) options -->
<string name="doze_overwrite_value_title">Overwrite value</string>
diff --git a/res/xml/button_settings.xml b/res/xml/button_settings.xml
index 1d9b03b..5a8d8e1 100644
--- a/res/xml/button_settings.xml
+++ b/res/xml/button_settings.xml
@@ -110,13 +110,6 @@
android:title="@string/keys_enable_custom_title"
android:persistent="false" />-->
- <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"/>
-
</PreferenceCategory>
<PreferenceCategory
@@ -256,6 +249,17 @@
android:dependency="keys_enable_custom" />
</PreferenceCategory>
+ <PreferenceCategory
+ android:key="button_other"
+ android:title="@string/button_other_title" >
+ <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"/>
+ </PreferenceCategory>
+
<!-- <PreferenceCategory
android:key="button_headsethook"
android:title="@string/button_headsethook_title" >
diff --git a/src/org/omnirom/omnigears/ButtonSettings.java b/src/org/omnirom/omnigears/ButtonSettings.java
index 7ddd3f2..a65bbd7 100644
--- a/src/org/omnirom/omnigears/ButtonSettings.java
+++ b/src/org/omnirom/omnigears/ButtonSettings.java
@@ -479,16 +479,16 @@
keysCategory.removePreference(mButtonBrightness);
}
updateDisableHWKeyEnablement(harwareKeysDisable);
-
- 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);
}
+ 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);
+
// final PreferenceCategory headsethookCategory =
// (PreferenceCategory) prefScreen.findPreference(CATEGORY_HEADSETHOOK);