aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/SuggestedWords.java
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2014-09-08 06:52:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-08 06:52:02 +0000
commit74332597d6461a45deaa00eeff3668febb5fde59 (patch)
tree8fd24ee0f9492b795fd7c5a7030dc79b3c96b6c2 /java/src/com/android/inputmethod/latin/SuggestedWords.java
parent100a8aec5bb3851f9d0a7c5921d4ea44fbdbdcc2 (diff)
parentc74ffe8edcf468effec2833299a219dfbd59de70 (diff)
downloadlatinime-74332597d6461a45deaa00eeff3668febb5fde59.tar.gz
latinime-74332597d6461a45deaa00eeff3668febb5fde59.tar.xz
latinime-74332597d6461a45deaa00eeff3668febb5fde59.zip
Merge "Add StatsUtils.onPickSuggestionManually and SuggestedWords.indexOf."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java9
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;