[2/2] OmniGears: bring back our more settings category
and add recents view settings
Change-Id: I9dc6fbe902ea00a9a16eaffb54eaeac9b56324f5
diff --git a/res/values/custom_strings.xml b/res/values/custom_strings.xml
index d11cc8b..49fcb44 100644
--- a/res/values/custom_strings.xml
+++ b/res/values/custom_strings.xml
@@ -230,4 +230,10 @@
<string name="quick_settings_summary">Configure quick settings tiles</string>
<string name="status_bar_icon_blacklist_title">Status bar icons</string>
<string name="status_bar_icon_blacklist_summary">Configure what icons are shown on status bar</string>
+
+ <string name="recents_category">Recents</string>
+ <string name="recents_search_bar_title">Show search bar</string>
+ <string name="recents_search_bar_summary"></string>
+ <string name="recents_fullscreen_title">Fullscreen</string>
+ <string name="recents_fullscreen_summary"></string>
</resources>
diff --git a/res/xml/more_interface_settings.xml b/res/xml/more_interface_settings.xml
new file mode 100644
index 0000000..a2ebb64
--- /dev/null
+++ b/res/xml/more_interface_settings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The OmniROM Project
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ android:key="interface_more"
+ android:title="@string/interface_more_title"
+ xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
+
+ <PreferenceCategory
+ android:key="category_recents"
+ android:title="@string/recents_category">
+
+ <com.android.settings.preference.SystemCheckBoxPreference
+ android:key="recents_show_search_bar"
+ android:title="@string/recents_search_bar_title"
+ android:summary="@string/recents_search_bar_summary"
+ android:defaultValue="true"/>
+
+ <com.android.settings.preference.SystemCheckBoxPreference
+ android:key="recents_full_screen"
+ android:title="@string/recents_fullscreen_title"
+ android:summary="@string/recents_fullscreen_summary"
+ android:defaultValue="false"/>
+ </PreferenceCategory>
+</PreferenceScreen>
+
diff --git a/src/org/omnirom/omnigears/interfacesettings/MoreInterfaceSettings.java b/src/org/omnirom/omnigears/interfacesettings/MoreInterfaceSettings.java
new file mode 100644
index 0000000..dedccf8
--- /dev/null
+++ b/src/org/omnirom/omnigears/interfacesettings/MoreInterfaceSettings.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2015 The OmniROM Project
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package org.omnirom.omnigears.interfacesettings;
+
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.R;
+
+import android.app.AlertDialog;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.preference.CheckBoxPreference;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.PreferenceGroup;
+import android.preference.PreferenceScreen;
+import android.preference.PreferenceCategory;
+import android.provider.Settings;
+import android.util.Log;
+
+import com.android.internal.logging.MetricsLogger;
+
+public class MoreInterfaceSettings extends SettingsPreferenceFragment implements
+ Preference.OnPreferenceChangeListener {
+ private static final String TAG = "MoreInterfaceSettings";
+
+ @Override
+ protected int getMetricsCategory() {
+ return MetricsLogger.OMNI_SETTINGS;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.more_interface_settings);
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+ return super.onPreferenceTreeClick(preferenceScreen, preference);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object objValue) {
+ return true;
+ }
+}
+