From 6e86632311a24af90ad35c98224ae25f226c1954 Mon Sep 17 00:00:00 2001 From: David Faden Date: Thu, 19 Mar 2015 13:30:43 -0700 Subject: [PATCH] Pass DictionaryFacilitator to GestureConsumer#onImeSuggestionsProcessed. Bug: 19712589 Change-Id: I81f9bf09b37487450780d85a1e4f752a9ba49370 --- .../inputmethod/latin/touchinputconsumer/GestureConsumer.java | 4 +++- java/src/com/android/inputmethod/latin/LatinIME.java | 3 ++- .../latin/touchinputconsumer/NullGestureConsumerTests.java | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/java-overridable/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java b/java-overridable/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java index 7a5d2e68f..8291b4f72 100644 --- a/java-overridable/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java +++ b/java-overridable/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java @@ -19,6 +19,7 @@ package com.android.inputmethod.latin.touchinputconsumer; import android.view.inputmethod.EditorInfo; import com.android.inputmethod.keyboard.Keyboard; +import com.android.inputmethod.latin.DictionaryFacilitator; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.common.InputPointers; import com.android.inputmethod.latin.inputlogic.PrivateCommandPerformer; @@ -62,6 +63,7 @@ public class GestureConsumer { } public void onImeSuggestionsProcessed(final SuggestedWords suggestedWords, - final int composingStart, final int composingLength) { + final int composingStart, final int composingLength, + final DictionaryFacilitator dictionaryFacilitator) { } } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index a8aeb8795..71dc30b2a 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1407,7 +1407,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen */ public void onTailBatchInputResultShown(final SuggestedWords suggestedWords) { mGestureConsumer.onImeSuggestionsProcessed(suggestedWords, - mInputLogic.getComposingStart(), mInputLogic.getComposingLength()); + mInputLogic.getComposingStart(), mInputLogic.getComposingLength(), + mDictionaryFacilitator); } // This method must run on the UI Thread. diff --git a/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java b/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java index ca1039bd9..ad6bcc3c4 100644 --- a/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java +++ b/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java @@ -34,7 +34,7 @@ public class NullGestureConsumerTests extends AndroidTestCase { GestureConsumer.NULL_GESTURE_CONSUMER.onGestureStarted(null, null); GestureConsumer.NULL_GESTURE_CONSUMER.onGestureCanceled(); GestureConsumer.NULL_GESTURE_CONSUMER.onGestureCompleted(null); - GestureConsumer.NULL_GESTURE_CONSUMER.onImeSuggestionsProcessed(null, -1, -1); + GestureConsumer.NULL_GESTURE_CONSUMER.onImeSuggestionsProcessed(null, -1, -1, null); } /**