From b7390ba5854c0f583858e085bff89eebe307eb39 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Mon, 21 Apr 2014 16:37:39 -0700 Subject: [PATCH] Fix missing summary for CheckBoxPreference - "summaryOn" and "summaryOff" were parsed but we were missing also "summary" Repro case: search for "adt" (from Developer options) Change-Id: Ifa829ec6c6f86cb426432f716c2d28df8550f9ea --- src/com/android/settings/search/Index.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/search/Index.java b/src/com/android/settings/search/Index.java index 6f919810759..4f5aa2cfb90 100644 --- a/src/com/android/settings/search/Index.java +++ b/src/com/android/settings/search/Index.java @@ -761,8 +761,12 @@ public class Index { keywords, intentAction, intentTargetPackage, intentTargetClass, true, key); } else { - final String summaryOn = getDataSummaryOn(context, attrs); - final String summaryOff = getDataSummaryOff(context, attrs); + String summaryOn = getDataSummaryOn(context, attrs); + String summaryOff = getDataSummaryOff(context, attrs); + + if (TextUtils.isEmpty(summaryOn) && TextUtils.isEmpty(summaryOff)) { + summaryOn = getDataSummary(context, attrs); + } updateOneRowWithFilteredData(database, localeStr, title, summaryOn, summaryOff, null, fragmentName, screenTitle, iconResId, rank,