Launcher3: Can't search out local app by Chinese
am: a9f4bffbfc
Change-Id: I1af93ffb397640ce54ee8f1938666db4f0262ea5
This commit is contained in:
@@ -132,7 +132,8 @@ public class DefaultAppSearchAlgorithm implements SearchAlgorithm {
|
||||
// Always a break point for a symbol
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
// Always a break point at first character
|
||||
return prevType == Character.UNASSIGNED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user