diff options
author | yingrenw <yingrenw@codeaurora.org> | 2017-07-06 18:37:35 +0800 |
---|---|---|
committer | yingrenw <yingrenw@codeaurora.org> | 2017-07-12 16:11:40 +0800 |
commit | ad19a3225d1558eb4d9f77e3d92f8baca5f59c66 (patch) | |
tree | f67eaddd9e3d1c128b15a25a5c102e7c4169cabc /tests | |
parent | a80a70f2f8c5e32e7b1ec6c78c4f7c3b3500102e (diff) | |
download | Launcher3-ad19a3225d1558eb4d9f77e3d92f8baca5f59c66.tar.gz |
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.
Change-Id: I3713f24c9206fe16a8da2a23e6c90d68079dd533
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java b/tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java index 18570de5b3..e9c2ebc745 100644 --- a/tests/src/com/android/launcher3/allapps/DefaultAppSearchAlgorithmTest.java +++ b/tests/src/com/android/launcher3/allapps/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) { |