summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2014-06-05 19:15:02 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2014-06-05 19:15:02 -0700
commit132652c5576462f036ed9437720b15b0c31430e4 (patch)
tree6aaea4cfbd66ac8305bb9714f2d3330986897411
parent21d26574eb1ddd61aea9775c57dafbcaaf2ef77a (diff)
downloadpackages_apps_Settings-132652c5576462f036ed9437720b15b0c31430e4.zip
packages_apps_Settings-132652c5576462f036ed9437720b15b0c31430e4.tar.gz
packages_apps_Settings-132652c5576462f036ed9437720b15b0c31430e4.tar.bz2
Do not show the Preference summary in Search results
- as the summary was sometimes showing "Unknown" or even not the real Preference value (we dont have right now the capability to know the current value of a Preference), so it is better to be safe than sorry. Change-Id: I009c31fc41ad35a630f4b34aa0ef998932f65263
-rw-r--r--res/layout/search_result_item.xml9
-rw-r--r--src/com/android/settings/dashboard/SearchResultsSummary.java28
2 files changed, 0 insertions, 37 deletions
diff --git a/res/layout/search_result_item.xml b/res/layout/search_result_item.xml
index 8e537d5..b659387 100644
--- a/res/layout/search_result_item.xml
+++ b/res/layout/search_result_item.xml
@@ -52,15 +52,6 @@
android:ellipsize="marquee"
android:fadingEdge="horizontal" />
- <TextView android:id="@+id/summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/title"
- android:layout_alignStart="@id/title"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary"
- android:maxLines="10" />
-
</RelativeLayout>
</LinearLayout>
diff --git a/src/com/android/settings/dashboard/SearchResultsSummary.java b/src/com/android/settings/dashboard/SearchResultsSummary.java
index 387e9bc..910d661 100644
--- a/src/com/android/settings/dashboard/SearchResultsSummary.java
+++ b/src/com/android/settings/dashboard/SearchResultsSummary.java
@@ -572,7 +572,6 @@ public class SearchResultsSummary extends Fragment {
View view;
TextView textTitle;
- TextView textSummary;
ImageView imageView;
if (convertView == null) {
@@ -582,38 +581,11 @@ public class SearchResultsSummary extends Fragment {
}
textTitle = (TextView) view.findViewById(R.id.title);
- textSummary = (TextView) view.findViewById(R.id.summary);
imageView = (ImageView) view.findViewById(R.id.icon);
final SearchResult result = (SearchResult) getItem(position);
textTitle.setText(result.title);
- final String summaryOn = result.summaryOn;
- final String entries = result.entries;
-
- final StringBuilder sb = new StringBuilder();
- if (!TextUtils.isEmpty(summaryOn) &&
- !summaryOn.contains(PERCENT_RECLACE) && !summaryOn.contains(DOLLAR_REPLACE)) {
- sb.append(summaryOn);
- sb.append(ELLIPSIS);
- } 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);
- }
-
- if (TextUtils.isEmpty(sb)) {
- textSummary.setVisibility(View.GONE);
- } else {
- textSummary.setText(sb.toString());
- textSummary.setVisibility(View.VISIBLE);
- }
-
if (result.iconResId != R.drawable.empty_icon) {
final Context packageContext = result.context;
final Drawable drawable;