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

Commit aeab9769 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Add method to retreive suggestions from SuggestionHelper

Bug: 3414081
Change-Id: I96ffdd1c60fad933b32f7df023c51a9d10fcc53f
parent 195e0f71
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -91,6 +91,11 @@ public class SuggestHelper {
        return mSuggest.isValidWord(typed);
    }

    // TODO: This may be slow, but is OK for test so far.
    public SuggestedWords getSuggestions(CharSequence typed) {
        return mSuggest.getSuggestions(null, createWordComposer(typed), null);
    }

    public CharSequence getFirstSuggestion(CharSequence typed) {
        WordComposer word = createWordComposer(typed);
        SuggestedWords suggestions = mSuggest.getSuggestions(null, word, null);