From aeab97695bd243a7ee25ce740e614d3a9ca52fec Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 14 Feb 2011 15:19:31 +0900 Subject: [PATCH] Add method to retreive suggestions from SuggestionHelper Bug: 3414081 Change-Id: I96ffdd1c60fad933b32f7df023c51a9d10fcc53f --- tests/src/com/android/inputmethod/latin/SuggestHelper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/src/com/android/inputmethod/latin/SuggestHelper.java b/tests/src/com/android/inputmethod/latin/SuggestHelper.java index ce4e5dee7..88f89d9ae 100644 --- a/tests/src/com/android/inputmethod/latin/SuggestHelper.java +++ b/tests/src/com/android/inputmethod/latin/SuggestHelper.java @@ -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);