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

Commit baf263ca authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Fix a NPE caused by a null typedWord

bug: 3514797
Change-Id: Ie1056745ded1f848d1e4f70c5344d6969de509b0
parent d465e2aa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ public class ExpandableDictionary extends Dictionary {
    /**
     * Returns the word's frequency or -1 if not found
     */
    public int getWordFrequency(CharSequence word) {
    protected int getWordFrequency(CharSequence word) {
        Node node = searchNode(mRoots, word, 0, word.length());
        return (node == null) ? -1 : node.mFrequency;
    }
+0 −1
Original line number Diff line number Diff line
@@ -1427,7 +1427,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen

    private void saveWordInHistory(CharSequence result) {
        if (mWord.size() <= 1) {
            mWord.reset();
            return;
        }
        // Skip if result is null. It happens in some edge case.