From 61e7ec658710eca3fd03af39b52b4a87eabcdd4c Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 26 Jun 2012 15:44:21 +0900 Subject: Remove the Callback interface for simpler code. (A17) Bug: 6252660 Bug: 6166228 Bug: 2704000 Bug: 6225530 Change-Id: I009b54fc2e73cadca6734bdca074d033e81f6a2b --- .../latin/spellcheck/AndroidSpellCheckerService.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/spellcheck') diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index 129f74f60..3bf18c520 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -32,7 +32,6 @@ import com.android.inputmethod.keyboard.ProximityInfo; import com.android.inputmethod.latin.BinaryDictionary; import com.android.inputmethod.latin.ContactsBinaryDictionary; import com.android.inputmethod.latin.Dictionary; -import com.android.inputmethod.latin.Dictionary.WordCallback; import com.android.inputmethod.latin.DictionaryCollection; import com.android.inputmethod.latin.DictionaryFactory; import com.android.inputmethod.latin.LocaleUtils; @@ -204,9 +203,8 @@ public class AndroidSpellCheckerService extends SpellCheckerService EMPTY_STRING_ARRAY); } - // TODO: remove this class when WordCallback is finally out of the picture and - // replace it by storage local to the session. - private static class SuggestionsGatherer implements WordCallback { + // TODO: remove this class and replace it by storage local to the session. + private static class SuggestionsGatherer { public static class Result { public final String[] mSuggestions; public final boolean mHasRecommendedSuggestions; @@ -240,12 +238,6 @@ public class AndroidSpellCheckerService extends SpellCheckerService mScores = new int[mMaxLength]; } - @Override - synchronized public boolean addWord(char[] word, int[] spaceIndices, int wordOffset, - int wordLength, int score, int dicTypeId, int dataType) { - return true; - } - synchronized public boolean oldAddWord(char[] word, int[] spaceIndices, int wordOffset, int wordLength, int score, int dicTypeId /* unused */, int dataType) { final int positionIndex = Arrays.binarySearch(mScores, 0, mLength, score); -- cgit v1.2.3-83-g751a