summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/search
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2014-04-15 14:03:19 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2014-04-15 14:09:25 -0700
commit8f5c65fd010d249770fda81c1129c1d7555a3299 (patch)
treeab87e7342c6b7e9cab5ba540a9c12728eef47e29 /src/com/android/settings/search
parent7a6bfd132cac4dcff72e3adcdd68a7ef777cee12 (diff)
downloadpackages_apps_Settings-8f5c65fd010d249770fda81c1129c1d7555a3299.tar.gz
packages_apps_Settings-8f5c65fd010d249770fda81c1129c1d7555a3299.tar.bz2
packages_apps_Settings-8f5c65fd010d249770fda81c1129c1d7555a3299.zip
Search results - just show the first item of ListPreference entries
- need to increment the database model version to force re-indexing - change entries separator from SPACE to PIPE - just show the first entries value in the Search results Change-Id: I747218ff3528c3231c0209f8870c12f65e036070
Diffstat (limited to 'src/com/android/settings/search')
-rw-r--r--src/com/android/settings/search/Index.java4
-rw-r--r--src/com/android/settings/search/IndexDatabaseHelper.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/settings/search/Index.java b/src/com/android/settings/search/Index.java
index d5d97f5b0..6f9198107 100644
--- a/src/com/android/settings/search/Index.java
+++ b/src/com/android/settings/search/Index.java
@@ -100,6 +100,8 @@ public class Index {
public static final int COLUMN_INDEX_ENABLED = 12;
public static final int COLUMN_INDEX_KEY = 13;
+ public static final String ENTRIES_SEPARATOR = "|";
+
// If you change the order of columns here, you SHOULD change the COLUMN_INDEX_XXX values
private static final String[] SELECT_COLUMNS = new String[] {
IndexColumns.DATA_RANK, // 0
@@ -994,7 +996,7 @@ public class Index {
final StringBuilder result = new StringBuilder();
for (int n = 0; n < count; n++) {
result.append(data[n]);
- result.append(" ");
+ result.append(ENTRIES_SEPARATOR);
}
return result.toString();
}
diff --git a/src/com/android/settings/search/IndexDatabaseHelper.java b/src/com/android/settings/search/IndexDatabaseHelper.java
index afcbfa1aa..4e94cb172 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 = 108;
+ private static final int DATABASE_VERSION = 109;
public interface Tables {
public static final String TABLE_PREFS_INDEX = "prefs_index";