mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Fixing text search where a word starting with lower case was not being matched
am: 28a64381b6
Change-Id: Ib5158d42219478c97d6bec5049e3354ee1087094
This commit is contained in:
@@ -115,7 +115,7 @@ public class DefaultAppSearchAlgorithm {
|
||||
return prevType != Character.UPPERCASE_LETTER;
|
||||
case Character.LOWERCASE_LETTER:
|
||||
// Break point if previous was not a letter.
|
||||
return prevType > Character.OTHER_LETTER;
|
||||
return prevType > Character.OTHER_LETTER || prevType <= Character.UNASSIGNED;
|
||||
case Character.DECIMAL_DIGIT_NUMBER:
|
||||
case Character.LETTER_NUMBER:
|
||||
case Character.OTHER_NUMBER:
|
||||
|
||||
@@ -67,6 +67,10 @@ public class DefaultAppSearchAlgorithmTest extends InstrumentationTestCase {
|
||||
|
||||
assertTrue(mAlgorithm.matches(getInfo("Q"), "q"));
|
||||
assertTrue(mAlgorithm.matches(getInfo(" Q"), "q"));
|
||||
|
||||
// match lower case words
|
||||
assertTrue(mAlgorithm.matches(getInfo("elephant"), "e"));
|
||||
|
||||
}
|
||||
|
||||
private AppInfo getInfo(String title) {
|
||||
|
||||
Reference in New Issue
Block a user