diff options
author | 2014-09-07 20:43:48 -0700 | |
---|---|---|
committer | 2014-09-07 20:43:48 -0700 | |
commit | c74ffe8edcf468effec2833299a219dfbd59de70 (patch) | |
tree | 97900d1f5196d552fbafd58edd40ef353fcdaab4 /java/src/com/android/inputmethod/latin/SuggestedWords.java | |
parent | f7be68e6360864f79ebe6ba293f46d04a2ef0936 (diff) | |
download | latinime-c74ffe8edcf468effec2833299a219dfbd59de70.tar.gz latinime-c74ffe8edcf468effec2833299a219dfbd59de70.tar.xz latinime-c74ffe8edcf468effec2833299a219dfbd59de70.zip |
Add StatsUtils.onPickSuggestionManually and SuggestedWords.indexOf.
Change-Id: I1588448154d086569cb026825fdc36cd1812a582
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 6bc3da885..dcfaa3f6d 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -142,6 +142,15 @@ public class SuggestedWords { return mSuggestedWordInfoList.get(index); } + /** + * Gets the suggestion index from the suggestions list. + * @param suggestedWordInfo The {@link SuggestedWordInfo} to find the index. + * @return The position of the suggestion in the suggestion list. + */ + public int indexOf(SuggestedWordInfo suggestedWordInfo) { + return mSuggestedWordInfoList.indexOf(suggestedWordInfo); + } + public String getDebugString(final int pos) { if (!DebugFlags.DEBUG_ENABLED) { return null; |