diff options
author | 2014-10-29 13:42:42 +0000 | |
---|---|---|
committer | 2014-10-29 13:42:44 +0000 | |
commit | 4e0149c22a78673f3ec7e0903f945587e12cc3b1 (patch) | |
tree | c9912ccaf7dd62f4f7ce6f78c3a925a33d4bb315 /java/src/com/android/inputmethod/latin | |
parent | 93e5cdea71266d0fa1e9c456c42407d7aea1e7cc (diff) | |
parent | 2ad6d9cda33825fa265cd17372f115bb48f49d19 (diff) | |
download | latinime-4e0149c22a78673f3ec7e0903f945587e12cc3b1.tar.gz latinime-4e0149c22a78673f3ec7e0903f945587e12cc3b1.tar.xz latinime-4e0149c22a78673f3ec7e0903f945587e12cc3b1.zip |
Merge "Remove DrawingHandler"
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 8 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 5fa28d571..3fa127005 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1501,14 +1501,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } // This method must run on the UI Thread. - void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords, + void showGesturePreviewAndSuggestionStrip(@Nonnull final SuggestedWords suggestedWords, final boolean dismissGestureFloatingPreviewText) { showSuggestionStrip(suggestedWords); final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView(); - mainKeyboardView.showGestureFloatingPreviewText(suggestedWords); - if (dismissGestureFloatingPreviewText) { - mainKeyboardView.dismissGestureFloatingPreviewText(); - } + mainKeyboardView.showGestureFloatingPreviewText(suggestedWords, + dismissGestureFloatingPreviewText /* dismissDelayed */); } // Called from PointerTracker through the KeyboardActionListener interface diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index b84de6919..c51e20f21 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -28,6 +28,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import javax.annotation.Nonnull; + public class SuggestedWords { public static final int INDEX_OF_TYPED_WORD = 0; public static final int INDEX_OF_AUTO_CORRECTION = 1; @@ -46,6 +48,7 @@ public class SuggestedWords { public static final int MAX_SUGGESTIONS = 18; private static final ArrayList<SuggestedWordInfo> EMPTY_WORD_INFO_LIST = new ArrayList<>(0); + @Nonnull private static final SuggestedWords EMPTY = new SuggestedWords( EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, INPUT_STYLE_NONE); @@ -210,6 +213,7 @@ public class SuggestedWords { return result; } + @Nonnull public static final SuggestedWords getEmptyInstance() { return SuggestedWords.EMPTY; } |