summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/search
diff options
context:
space:
mode:
authorDiogo Ferreira <diogo@underdev.org>2016-02-05 15:45:05 +0000
committerDiogo Ferreira <diogo@underdev.org>2016-02-17 15:23:17 +0000
commit67365603060148a8a59dd0dde831174202554d61 (patch)
tree86b5f2f9e58a83dc41ca632f2fdb9204b1ea8057 /src/com/android/settings/search
parent1eb75899a890907cdd18868336d3329242cb9e60 (diff)
downloadpackages_apps_Settings-67365603060148a8a59dd0dde831174202554d61.zip
packages_apps_Settings-67365603060148a8a59dd0dde831174202554d61.tar.gz
packages_apps_Settings-67365603060148a8a59dd0dde831174202554d61.tar.bz2
Settings: Add CM-specific settings
Change-Id: Iae0f60a62a51e96893766c4fa50a60ac4a214102 Ticket: CYNGNOS-1577
Diffstat (limited to 'src/com/android/settings/search')
-rw-r--r--src/com/android/settings/search/IndexDatabaseHelper.java2
-rw-r--r--src/com/android/settings/search/Ranking.java6
-rw-r--r--src/com/android/settings/search/SearchIndexableResources.java34
3 files changed, 41 insertions, 1 deletions
diff --git a/src/com/android/settings/search/IndexDatabaseHelper.java b/src/com/android/settings/search/IndexDatabaseHelper.java
index 273960d..3f52e45 100644
--- a/src/com/android/settings/search/IndexDatabaseHelper.java
+++ b/src/com/android/settings/search/IndexDatabaseHelper.java
@@ -28,7 +28,7 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper {
private static final String TAG = "IndexDatabaseHelper";
private static final String DATABASE_NAME = "search_index.db";
- private static final int DATABASE_VERSION = 116;
+ private static final int DATABASE_VERSION = 117;
public interface Tables {
public static final String TABLE_PREFS_INDEX = "prefs_index";
diff --git a/src/com/android/settings/search/Ranking.java b/src/com/android/settings/search/Ranking.java
index 2dc1a89..4d80f14 100644
--- a/src/com/android/settings/search/Ranking.java
+++ b/src/com/android/settings/search/Ranking.java
@@ -53,6 +53,9 @@ import com.android.settings.wifi.AdvancedWifiSettings;
import com.android.settings.wifi.SavedAccessPointsWifiSettings;
import com.android.settings.wifi.WifiSettings;
+import com.android.settings.ButtonSettings;
+import com.android.settings.cyanogenmod.StatusBarSettings;
+
import java.util.HashMap;
/**
@@ -117,6 +120,8 @@ public final class Ranking {
// Display
sRankMap.put(DisplaySettings.class.getName(), RANK_DISPLAY);
+ sRankMap.put(ButtonSettings.class.getName(), RANK_DISPLAY);
+ sRankMap.put(StatusBarSettings.class.getName(), RANK_DISPLAY);
// Wallpapers
sRankMap.put(WallpaperTypeSettings.class.getName(), RANK_WALLPAPER);
@@ -156,6 +161,7 @@ public final class Ranking {
// Privacy
sRankMap.put(PrivacySettings.class.getName(), RANK_PRIVACY);
+ sRankMap.put(com.android.settings.cyanogenmod.PrivacySettings.class.getName(), RANK_PRIVACY);
// Date / Time
sRankMap.put(DateTimeSettings.class.getName(), RANK_DATE_TIME);
diff --git a/src/com/android/settings/search/SearchIndexableResources.java b/src/com/android/settings/search/SearchIndexableResources.java
index a7a8264..f6a927f 100644
--- a/src/com/android/settings/search/SearchIndexableResources.java
+++ b/src/com/android/settings/search/SearchIndexableResources.java
@@ -54,6 +54,9 @@ import com.android.settings.wifi.AdvancedWifiSettings;
import com.android.settings.wifi.SavedAccessPointsWifiSettings;
import com.android.settings.wifi.WifiSettings;
+import com.android.settings.ButtonSettings;
+import com.android.settings.cyanogenmod.StatusBarSettings;
+
import java.util.Collection;
import java.util.HashMap;
@@ -309,6 +312,37 @@ public final class SearchIndexableResources {
R.xml.wifi_calling_settings,
WifiCallingSettings.class.getName(),
R.drawable.ic_settings_wireless));
+
+ // CyanogenMod Settings
+ sResMap.put(ButtonSettings.class.getName(),
+ new SearchIndexableResource(
+ Ranking.getRankForClassName(ButtonSettings.class.getName()),
+ R.xml.button_settings,
+ ButtonSettings.class.getName(),
+ R.drawable.ic_settings_buttons));
+
+ sResMap.put(StatusBarSettings.class.getName(),
+ new SearchIndexableResource(
+ Ranking.getRankForClassName(StatusBarSettings.class.getName()),
+ R.xml.status_bar_settings,
+ StatusBarSettings.class.getName(),
+ R.drawable.ic_settings_statusbar));
+
+ sResMap.put(com.android.settings.cyanogenmod.PrivacySettings.class.getName(),
+ new SearchIndexableResource(
+ Ranking.getRankForClassName(
+ com.android.settings.cyanogenmod.PrivacySettings.class.getName()),
+ R.xml.privacy_settings_cyanogenmod,
+ com.android.settings.cyanogenmod.PrivacySettings.class.getName(),
+ R.drawable.ic_settings_privacy));
+
+ sResMap.put(com.android.settings.cyanogenmod.LockscreenSettingsAlias.class.getName(),
+ new SearchIndexableResource(
+ Ranking.getRankForClassName(
+ com.android.settings.cyanogenmod.LockscreenSettingsAlias.class.getName()),
+ NO_DATA_RES_ID,
+ com.android.settings.cyanogenmod.LockscreenSettingsAlias.class.getName(),
+ R.drawable.ic_settings_lockscreen));
}
private SearchIndexableResources() {