summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoryingrenw <yingrenw@codeaurora.org>2017-07-06 18:37:35 +0800
committerSunny Goyal <sunnygoyal@google.com>2017-07-18 08:28:11 +0000
commitd791f3a4fa845e7bbb9d754ad950547544c8d3ed (patch)
tree314c3d786c3d9e05f68c0a79fbd36ea4793c9103 /tests
parentbee75ded54e1be42caa3f39db30f96790e57afec (diff)
downloadandroid_packages_apps_Trebuchet-d791f3a4fa845e7bbb9d754ad950547544c8d3ed.tar.gz
android_packages_apps_Trebuchet-d791f3a4fa845e7bbb9d754ad950547544c8d3ed.tar.bz2
android_packages_apps_Trebuchet-d791f3a4fa845e7bbb9d754ad950547544c8d3ed.zip
Launcher3: Can't search out local app by Chinese
Description: Chinese content type is Character.OTHER_LETTER. When key matches,it check the content type. And if type is Character.OTHER_LETTER, it doesn't support search and break. When the content type is Character.OTHER_LETTER, make it work normally. Bug: 63534074 Change-Id: I3713f24c9206fe16a8da2a23e6c90d68079dd533 (cherry picked from commit a9f4bffbfc9802ca86a813de2bccea9572f710af)
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java b/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java
index 20b23b070..58dc0c43e 100644
--- a/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java
+++ b/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java
@@ -71,6 +71,10 @@ public class DefaultAppSearchAlgorithmTest extends InstrumentationTestCase {
// match lower case words
assertTrue(mAlgorithm.matches(getInfo("elephant"), "e"));
+ assertTrue(mAlgorithm.matches(getInfo("电子邮件"), "电"));
+ assertTrue(mAlgorithm.matches(getInfo("电子邮件"), "电子"));
+ assertFalse(mAlgorithm.matches(getInfo("电子邮件"), "子"));
+ assertFalse(mAlgorithm.matches(getInfo("电子邮件"), "邮件"));
}
private AppInfo getInfo(String title) {