summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/allapps/DefaultAppSearchAlgorithm.java2
-rw-r--r--tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithm.java b/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithm.java
index ac22dd2..06cf9aa 100644
--- a/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithm.java
+++ b/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithm.java
@@ -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:
diff --git a/tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java b/tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java
index 4d0a7a9..18570de 100644
--- a/tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java
+++ b/tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java
@@ -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) {