Skip to content

Commit 4112e3f

Browse files
committed
Search: include all category children in case category matches itself
Preference categories are Preference instances with disabled state thus they were not covered by 406d91a This fixis it.
1 parent 252d646 commit 4112e3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/com/ceco/oreo/gravitybox/GravityBoxSettings.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,8 @@ private int filterPreferencesInternal(PreferenceGroup prefGroup, PreferenceGroup
20092009
p.getTitle().toString()).toLowerCase(Locale.getDefault());
20102010
String summary = (p.getSummary() == null ? "" :
20112011
p.getSummary().toString()).toLowerCase(Locale.getDefault());
2012-
if (p.isEnabled() && (title.contains(mSearchQuery) || summary.contains(mSearchQuery))) {
2012+
if ((p.isEnabled() || (p instanceof PreferenceCategory)) &&
2013+
(title.contains(mSearchQuery) || summary.contains(mSearchQuery))) {
20132014
matchCount++;
20142015
} else if (p instanceof PreferenceGroup && p.getIntent() == null) {
20152016
matchCount += filterPreferencesInternal((PreferenceGroup)p, prefGroup);

0 commit comments

Comments
 (0)