Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdfcf129 authored by Sunny Goyal's avatar Sunny Goyal Committed by android-build-merger
Browse files

Merge "Launcher3: Can't search out local app by Chinese" am: 7c35c64a am:...

Merge "Launcher3: Can't search out local app by Chinese" am: 7c35c64a am: fa551113 am: 788000b0
am: 29e4a28f

Change-Id: I2ffeab12ebdd4422fb92c263fa7de927bf8bd506
parents 6e880ec7 29e4a28f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
        }
    }
}
+4 −0
Original line number Diff line number Diff line
@@ -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) {