Refactoring (A82)
The user history dictionary should be the one knowing it does not suggest words beyond 2 characters, not Suggest. Change-Id: Ie85ec6116eb495e0c7f51108e4620c5ae536f4bfmain
parent
966efe4889
commit
fb6eeeb35a
|
@ -194,9 +194,8 @@ public class Suggest {
|
|||
}
|
||||
// At second character typed, search the unigrams (scores being affected by bigrams)
|
||||
for (final String key : mDictionaries.keySet()) {
|
||||
// Skip UserUnigramDictionary and WhitelistDictionary to lookup
|
||||
if (key.equals(Dictionary.TYPE_USER_HISTORY)
|
||||
|| key.equals(Dictionary.TYPE_WHITELIST))
|
||||
// Skip WhitelistDictionary to lookup
|
||||
if (key.equals(Dictionary.TYPE_WHITELIST))
|
||||
continue;
|
||||
final Dictionary dictionary = mDictionaries.get(key);
|
||||
suggestionsSet.addAll(dictionary.getWords(
|
||||
|
|
|
@ -27,9 +27,12 @@ import android.os.AsyncTask;
|
|||
import android.provider.BaseColumns;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.inputmethod.keyboard.ProximityInfo;
|
||||
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
||||
import com.android.inputmethod.latin.UserHistoryForgettingCurveUtils.ForgettingCurveParams;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
@ -157,6 +160,14 @@ public class UserHistoryDictionary extends ExpandableDictionary {
|
|||
// super.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<SuggestedWordInfo> getWords(final WordComposer composer,
|
||||
final CharSequence prevWord, final ProximityInfo proximityInfo) {
|
||||
// User history unigrams are not used at this moment. Implement this method to make them
|
||||
// useful.
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the passed charsequence is in the dictionary.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue