summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/dashboard
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/dashboard
parent7a6bfd132cac4dcff72e3adcdd68a7ef777cee12 (diff)
downloadpackages_apps_Settings-8f5c65fd010d249770fda81c1129c1d7555a3299.zip
packages_apps_Settings-8f5c65fd010d249770fda81c1129c1d7555a3299.tar.gz
packages_apps_Settings-8f5c65fd010d249770fda81c1129c1d7555a3299.tar.bz2
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/dashboard')
-rw-r--r--src/com/android/settings/dashboard/SearchResultsSummary.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/settings/dashboard/SearchResultsSummary.java b/src/com/android/settings/dashboard/SearchResultsSummary.java
index e78c7a0..94f3778 100644
--- a/src/com/android/settings/dashboard/SearchResultsSummary.java
+++ b/src/com/android/settings/dashboard/SearchResultsSummary.java
@@ -342,12 +342,18 @@ public class SearchResultsSummary extends Fragment {
!summaryOn.contains(PERCENT_RECLACE) && !summaryOn.contains(DOLLAR_REPLACE)) {
sb.append(summaryOn);
sb.append(ELLIPSIS);
- }
- if (!TextUtils.isEmpty(entries)) {
- sb.append(" \n ");
- sb.append(entries);
+ } else if (!TextUtils.isEmpty(entries)) {
+ final int index = entries.indexOf(Index.ENTRIES_SEPARATOR);
+ if (index > 0) {
+ final String firstEntriesValue = entries.substring(0, index);
+ sb.append(firstEntriesValue);
+ } else {
+ sb.append(entries);
+ }
+ sb.append(ELLIPSIS);
}
textSummary.setText(sb.toString());
+
if (result.iconResId != R.drawable.empty_icon) {
final Context packageContext = result.context;
final Drawable drawable;