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

Commit 4556de4b authored by Jean Chalard's avatar Jean Chalard
Browse files

Do not use contacts for bigram prediction.

bug: 4346034

Change-Id: Ibc3c27ca92ed61f1f689df3e90e2eb60fa0cbd33
parent 1123bcaf
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -95,6 +95,14 @@ public class ContactsDictionary extends ExpandableDictionary {
        mLastLoadedContacts = SystemClock.uptimeMillis();
    }

    @Override
    public void getBigrams(final WordComposer codes, final CharSequence previousWord,
            final WordCallback callback) {
        // Do not return bigrams from Contacts when nothing was typed.
        if (codes.size() <= 0) return;
        super.getBigrams(codes, previousWord, callback);
    }

    private void addWords(Cursor cursor) {
        clearDictionary();