aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/AutoCorrection.java9
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java133
-rw-r--r--java/src/com/android/inputmethod/latin/Settings.java7
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java40
4 files changed, 44 insertions, 145 deletions
diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java
index e6ae2c5c7..fc9771065 100644
--- a/java/src/com/android/inputmethod/latin/AutoCorrection.java
+++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java
@@ -50,7 +50,7 @@ public class AutoCorrection {
public void updateAutoCorrectionStatus(Map<String, Dictionary> dictionaries,
WordComposer wordComposer, ArrayList<CharSequence> suggestions, int[] sortedScores,
CharSequence typedWord, double autoCorrectionThreshold, int correctionMode,
- CharSequence quickFixedWord, CharSequence whitelistedWord) {
+ CharSequence whitelistedWord) {
if (hasAutoCorrectionForWhitelistedWord(whitelistedWord)) {
mHasAutoCorrection = true;
mAutoCorrectionWord = whitelistedWord;
@@ -58,9 +58,6 @@ public class AutoCorrection {
dictionaries, wordComposer, suggestions, typedWord, correctionMode)) {
mHasAutoCorrection = true;
mAutoCorrectionWord = typedWord;
- } else if (hasAutoCorrectionForQuickFix(quickFixedWord)) {
- mHasAutoCorrection = true;
- mAutoCorrectionWord = quickFixedWord;
} else if (hasAutoCorrectionForBinaryDictionary(wordComposer, suggestions, correctionMode,
sortedScores, typedWord, autoCorrectionThreshold)) {
mHasAutoCorrection = true;
@@ -109,10 +106,6 @@ public class AutoCorrection {
|| correctionMode == Suggest.CORRECTION_FULL_BIGRAM);
}
- private static boolean hasAutoCorrectionForQuickFix(CharSequence quickFixedWord) {
- return quickFixedWord != null;
- }
-
private boolean hasAutoCorrectionForBinaryDictionary(WordComposer wordComposer,
ArrayList<CharSequence> suggestions, int correctionMode, int[] sortedScores,
CharSequence typedWord, double autoCorrectionThreshold) {
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index dfb4d0622..36e97af11 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -60,7 +60,6 @@ import com.android.inputmethod.compat.SuggestionSpanUtils;
import com.android.inputmethod.compat.VibratorCompatWrapper;
import com.android.inputmethod.deprecated.LanguageSwitcherProxy;
import com.android.inputmethod.deprecated.VoiceProxy;
-import com.android.inputmethod.deprecated.recorrection.Recorrection;
import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardActionListener;
@@ -119,6 +118,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public static final String SUBTYPE_EXTRA_VALUE_ASCII_CAPABLE = "AsciiCapable";
/**
+ * The subtype extra value used to indicate that the subtype keyboard layout supports touch
+ * position correction.
+ */
+ public static final String SUBTYPE_EXTRA_VALUE_SUPPORT_TOUCH_POSITION_CORRECTION =
+ "SupportTouchPositionCorrection";
+ /**
* The subtype extra value used to indicate that the subtype keyboard layout should be loaded
* from the specified locale.
*/
@@ -168,7 +173,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private KeyboardSwitcher mKeyboardSwitcher;
private SubtypeSwitcher mSubtypeSwitcher;
private VoiceProxy mVoiceProxy;
- private Recorrection mRecorrection;
private UserDictionary mUserDictionary;
private UserBigramDictionary mUserBigramDictionary;
@@ -229,14 +233,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public static class UIHandler extends StaticInnerHandlerWrapper<LatinIME> {
private static final int MSG_UPDATE_SUGGESTIONS = 0;
- private static final int MSG_UPDATE_OLD_SUGGESTIONS = 1;
- private static final int MSG_UPDATE_SHIFT_STATE = 2;
- private static final int MSG_VOICE_RESULTS = 3;
- private static final int MSG_FADEOUT_LANGUAGE_ON_SPACEBAR = 4;
- private static final int MSG_DISMISS_LANGUAGE_ON_SPACEBAR = 5;
- private static final int MSG_SPACE_TYPED = 6;
- private static final int MSG_SET_BIGRAM_PREDICTIONS = 7;
- private static final int MSG_PENDING_IMS_CALLBACK = 8;
+ private static final int MSG_UPDATE_SHIFT_STATE = 1;
+ private static final int MSG_VOICE_RESULTS = 2;
+ private static final int MSG_FADEOUT_LANGUAGE_ON_SPACEBAR = 3;
+ private static final int MSG_DISMISS_LANGUAGE_ON_SPACEBAR = 4;
+ private static final int MSG_SPACE_TYPED = 5;
+ private static final int MSG_SET_BIGRAM_PREDICTIONS = 6;
+ private static final int MSG_PENDING_IMS_CALLBACK = 7;
public UIHandler(LatinIME outerInstance) {
super(outerInstance);
@@ -251,13 +254,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
case MSG_UPDATE_SUGGESTIONS:
latinIme.updateSuggestions();
break;
- case MSG_UPDATE_OLD_SUGGESTIONS:
- latinIme.mRecorrection.fetchAndDisplayRecorrectionSuggestions(
- latinIme.mVoiceProxy, latinIme.mSuggestionsView,
- latinIme.mSuggest, latinIme.mKeyboardSwitcher, latinIme.mWordComposer,
- latinIme.mHasUncommittedTypedChars, latinIme.mLastSelectionStart,
- latinIme.mLastSelectionEnd, latinIme.mSettingsValues.mWordSeparators);
- break;
case MSG_UPDATE_SHIFT_STATE:
switcher.updateShiftState();
break;
@@ -302,16 +298,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
return hasMessages(MSG_UPDATE_SUGGESTIONS);
}
- public void postUpdateOldSuggestions() {
- removeMessages(MSG_UPDATE_OLD_SUGGESTIONS);
- sendMessageDelayed(obtainMessage(MSG_UPDATE_OLD_SUGGESTIONS),
- getOuterInstance().mSettingsValues.mDelayUpdateOldSuggestions);
- }
-
- public void cancelUpdateOldSuggestions() {
- removeMessages(MSG_UPDATE_OLD_SUGGESTIONS);
- }
-
public void postUpdateShiftKeyState() {
removeMessages(MSG_UPDATE_SHIFT_STATE);
sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE),
@@ -470,7 +456,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
InputMethodManagerCompatWrapper.init(this);
SubtypeSwitcher.init(this);
KeyboardSwitcher.init(this, prefs);
- Recorrection.init(this, prefs);
AccessibilityUtils.init(this, prefs);
super.onCreate();
@@ -479,7 +464,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mInputMethodId = Utils.getInputMethodId(mImm, getPackageName());
mSubtypeSwitcher = SubtypeSwitcher.getInstance();
mKeyboardSwitcher = KeyboardSwitcher.getInstance();
- mRecorrection = Recorrection.getInstance();
mVibrator = VibratorCompatWrapper.getInstance(this);
DEBUG = LatinImeLogger.sDBG;
@@ -550,7 +534,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (mSettingsValues.mAutoCorrectEnabled) {
mSuggest.setAutoCorrectionThreshold(mSettingsValues.mAutoCorrectionThreshold);
}
- updateAutoTextEnabled();
mUserDictionary = new UserDictionary(this, localeStr);
mSuggest.setUserDictionary(mUserDictionary);
@@ -734,7 +717,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
loadSettings();
updateCorrectionMode();
- updateAutoTextEnabled();
updateSuggestionVisibility(mPrefs, mResources);
if (mSuggest != null && mSettingsValues.mAutoCorrectEnabled) {
@@ -760,8 +742,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
inputView.setKeyPreviewPopupEnabled(mSettingsValues.mKeyPreviewPopupOn,
mSettingsValues.mKeyPreviewPopupDismissDelay);
inputView.setProximityCorrectionEnabled(true);
- // If we just entered a text field, maybe it has some old text that requires correction
- mRecorrection.checkRecorrectionOnStart();
voiceIme.onStartInputView(inputView.getWindowToken());
@@ -850,7 +830,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (inputView != null) inputView.cancelAllMessages();
// Remove pending messages related to update suggestions
mHandler.cancelUpdateSuggestions();
- mHandler.cancelUpdateOldSuggestions();
}
@Override
@@ -884,35 +863,23 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final boolean selectionChanged = (newSelStart != candidatesEnd
|| newSelEnd != candidatesEnd) && mLastSelectionStart != newSelStart;
final boolean candidatesCleared = candidatesStart == -1 && candidatesEnd == -1;
- if (!mExpectingUpdateSelection
- && ((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars)
- || mVoiceProxy.isVoiceInputHighlighted())
- && (selectionChanged || candidatesCleared)) {
- if (candidatesCleared) {
- // If the composing span has been cleared, save the typed word in the history for
- // recorrection before we reset the suggestions strip. Then, we'll be able to show
- // suggestions for recorrection right away.
- mRecorrection.saveRecorrectionSuggestion(mWordComposer, mComposingStringBuilder);
- }
- mComposingStringBuilder.setLength(0);
- mHasUncommittedTypedChars = false;
- if (isCursorTouchingWord()) {
- mHandler.cancelUpdateBigramPredictions();
- mHandler.postUpdateSuggestions();
- } else {
- setPunctuationSuggestions();
- }
- TextEntryState.reset();
- final InputConnection ic = getCurrentInputConnection();
- if (ic != null) {
- ic.finishComposingText();
- }
- mVoiceProxy.setVoiceInputHighlighted(false);
- } else if (!mHasUncommittedTypedChars && !mExpectingUpdateSelection
- && TextEntryState.isAcceptedDefault()) {
- TextEntryState.reset();
- }
if (!mExpectingUpdateSelection) {
+ if (((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars)
+ || mVoiceProxy.isVoiceInputHighlighted())
+ && (selectionChanged || candidatesCleared)) {
+ mComposingStringBuilder.setLength(0);
+ mHasUncommittedTypedChars = false;
+ TextEntryState.reset();
+ updateSuggestions();
+ final InputConnection ic = getCurrentInputConnection();
+ if (ic != null) {
+ ic.finishComposingText();
+ }
+ mVoiceProxy.setVoiceInputHighlighted(false);
+ } else if (!mHasUncommittedTypedChars) {
+ TextEntryState.reset();
+ updateSuggestions();
+ }
mJustAddedMagicSpace = false; // The user moved the cursor.
mJustReplacedDoubleSpace = false;
}
@@ -922,11 +889,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// Make a note of the cursor position
mLastSelectionStart = newSelStart;
mLastSelectionEnd = newSelEnd;
-
- mRecorrection.updateRecorrectionSelection(mKeyboardSwitcher,
- mSuggestionsView, candidatesStart, candidatesEnd, newSelStart,
- newSelEnd, oldSelStart, mLastSelectionStart,
- mLastSelectionEnd, mHasUncommittedTypedChars);
}
public void setLastSelection(int start, int end) {
@@ -944,7 +906,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
*/
@Override
public void onExtractedTextClicked() {
- if (mRecorrection.isRecorrectionEnabled() && isSuggestionsRequested()) return;
+ if (isSuggestionsRequested()) return;
super.onExtractedTextClicked();
}
@@ -960,7 +922,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
*/
@Override
public void onExtractedCursorMovement(int dx, int dy) {
- if (mRecorrection.isRecorrectionEnabled() && isSuggestionsRequested()) return;
+ if (isSuggestionsRequested()) return;
super.onExtractedCursorMovement(dx, dy);
}
@@ -976,7 +938,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mOptionsDialog = null;
}
mVoiceProxy.hideVoiceWindow(mConfigurationChanging);
- mRecorrection.clearWordsInHistory();
super.hideWindow();
}
@@ -1332,7 +1293,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mVoiceProxy.commitVoiceInput();
final InputConnection ic = getCurrentInputConnection();
if (ic == null) return;
- mRecorrection.abortRecorrection(false);
ic.beginBatchEdit();
commitTyped(ic);
maybeRemovePreviousPeriod(ic, text);
@@ -1448,17 +1408,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
removeTrailingSpace();
}
- if (mLastSelectionStart == mLastSelectionEnd) {
- mRecorrection.abortRecorrection(false);
- }
-
int code = primaryCode;
if ((isAlphabet(code) || mSettingsValues.isSymbolExcludedFromWordSeparators(code))
&& isSuggestionsRequested() && !isCursorTouchingWord()) {
if (!mHasUncommittedTypedChars) {
mHasUncommittedTypedChars = true;
mComposingStringBuilder.setLength(0);
- mRecorrection.saveRecorrectionSuggestion(mWordComposer, mBestWord);
mWordComposer.reset();
clearSuggestions();
}
@@ -1524,7 +1479,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final InputConnection ic = getCurrentInputConnection();
if (ic != null) {
ic.beginBatchEdit();
- mRecorrection.abortRecorrection(false);
}
if (mHasUncommittedTypedChars) {
// In certain languages where single quote is a separator, it's better
@@ -1570,7 +1524,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (Keyboard.CODE_SPACE == primaryCode) {
if (!isCursorTouchingWord()) {
mHandler.cancelUpdateSuggestions();
- mHandler.cancelUpdateOldSuggestions();
mHandler.postUpdateBigramPredictions();
}
} else {
@@ -1657,6 +1610,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
return;
}
+ mHandler.cancelUpdateSuggestions();
+ mHandler.cancelUpdateBigramPredictions();
+
if (!mHasUncommittedTypedChars) {
setPunctuationSuggestions();
return;
@@ -1673,8 +1629,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
// getSuggestedWordBuilder handles gracefully a null value of prevWord
final SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder(
- mKeyboardSwitcher.getKeyboardView(), wordComposer, prevWord,
- mKeyboardSwitcher.getLatinKeyboard().getProximityInfo());
+ wordComposer, prevWord, mKeyboardSwitcher.getLatinKeyboard().getProximityInfo());
boolean autoCorrectionAvailable = !mInputTypeNoAutoCorrect && mSuggest.hasAutoCorrection();
final CharSequence typedWord = wordComposer.getTypedWord();
@@ -1890,7 +1845,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
ic.commitText(bestWord, 1);
}
}
- mRecorrection.saveRecorrectionSuggestion(mWordComposer, bestWord);
mHasUncommittedTypedChars = false;
mCommittedLength = bestWord.length();
}
@@ -1907,9 +1861,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final CharSequence prevWord = EditingUtils.getThisWord(getCurrentInputConnection(),
mSettingsValues.mWordSeparators);
- SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder(
- mKeyboardSwitcher.getKeyboardView(), sEmptyWordComposer, prevWord,
- mKeyboardSwitcher.getLatinKeyboard().getProximityInfo());
+ SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder(sEmptyWordComposer,
+ prevWord, mKeyboardSwitcher.getLatinKeyboard().getProximityInfo());
if (builder.size() > 0) {
// Explicitly supply an empty typed word (the no-second-arg version of
@@ -2214,18 +2167,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
}
- private void updateAutoTextEnabled() {
- if (mSuggest == null) return;
- // We want to use autotext if the settings are asking for auto corrections, and if
- // the input language is the same as the system language (because autotext will only
- // work in the system language so if we are entering text in a different language we
- // do not want it on).
- // We used to look at the "quick fixes" option instead of mAutoCorrectEnabled, but
- // this option was redundant and confusing and therefore removed.
- mSuggest.setQuickFixesEnabled(mSettingsValues.mAutoCorrectEnabled
- && SubtypeSwitcher.getInstance().isSystemLanguageSameAsInputLanguage());
- }
-
private void updateSuggestionVisibility(final SharedPreferences prefs, final Resources res) {
final String suggestionVisiblityStr = prefs.getString(
Settings.PREF_SHOW_SUGGESTIONS_SETTING,
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index bd94bab34..d9508f4c1 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -64,7 +64,6 @@ public class Settings extends InputMethodSettingsActivity
public static final String PREF_VIBRATE_ON = "vibrate_on";
public static final String PREF_SOUND_ON = "sound_on";
public static final String PREF_KEY_PREVIEW_POPUP_ON = "popup_on";
- public static final String PREF_RECORRECTION_ENABLED = "recorrection_enabled";
public static final String PREF_AUTO_CAP = "auto_cap";
public static final String PREF_SHOW_SETTINGS_KEY = "show_settings_key";
public static final String PREF_VOICE_SETTINGS_KEY = "voice_mode";
@@ -435,12 +434,6 @@ public class Settings extends InputMethodSettingsActivity
generalSettings.removePreference(findPreference(PREF_KEY_PREVIEW_POPUP_ON));
}
- final boolean showRecorrectionOption = res.getBoolean(
- R.bool.config_enable_show_recorrection_option);
- if (!showRecorrectionOption) {
- generalSettings.removePreference(findPreference(PREF_RECORRECTION_ENABLED));
- }
-
final boolean showBigramSuggestionsOption = res.getBoolean(
R.bool.config_enable_bigram_suggestions_option);
if (!showBigramSuggestionsOption) {
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 16dccf824..208fd13ec 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -17,10 +17,8 @@
package com.android.inputmethod.latin;
import android.content.Context;
-import android.text.AutoText;
import android.text.TextUtils;
import android.util.Log;
-import android.view.View;
import com.android.inputmethod.keyboard.ProximityInfo;
@@ -97,8 +95,6 @@ public class Suggest implements Dictionary.WordCallback {
private static final int PREF_MAX_BIGRAMS = 60;
- private boolean mQuickFixesEnabled;
-
private double mAutoCorrectionThreshold;
private int[] mScores = new int[mPrefMaxSuggestions];
private int[] mBigramScores = new int[PREF_MAX_BIGRAMS];
@@ -160,6 +156,7 @@ public class Suggest implements Dictionary.WordCallback {
final Locale locale) {
mMainDict = null;
new Thread("InitializeBinaryDictionary") {
+ @Override
public void run() {
final Dictionary newMainDict = DictionaryFactory.createDictionaryFromManager(
context, locale, dictionaryResId);
@@ -170,11 +167,6 @@ public class Suggest implements Dictionary.WordCallback {
}.start();
}
-
- public void setQuickFixesEnabled(boolean enabled) {
- mQuickFixesEnabled = enabled;
- }
-
public int getCorrectionMode() {
return mCorrectionMode;
}
@@ -256,14 +248,13 @@ public class Suggest implements Dictionary.WordCallback {
/**
* Returns a object which represents suggested words that match the list of character codes
* passed in. This object contents will be overwritten the next time this function is called.
- * @param view a view for retrieving the context for AutoText
* @param wordComposer contains what is currently being typed
* @param prevWordForBigram previous word (used only for bigram)
* @return suggested words object.
*/
- public SuggestedWords getSuggestions(final View view, final WordComposer wordComposer,
+ public SuggestedWords getSuggestions(final WordComposer wordComposer,
final CharSequence prevWordForBigram, final ProximityInfo proximityInfo) {
- return getSuggestedWordBuilder(view, wordComposer, prevWordForBigram,
+ return getSuggestedWordBuilder(wordComposer, prevWordForBigram,
proximityInfo).build();
}
@@ -295,7 +286,7 @@ public class Suggest implements Dictionary.WordCallback {
}
// TODO: cleanup dictionaries looking up and suggestions building with SuggestedWords.Builder
- public SuggestedWords.Builder getSuggestedWordBuilder(final View view,
+ public SuggestedWords.Builder getSuggestedWordBuilder(
final WordComposer wordComposer, CharSequence prevWordForBigram,
final ProximityInfo proximityInfo) {
LatinImeLogger.onStartSuggestion(prevWordForBigram);
@@ -336,6 +327,7 @@ public class Suggest implements Dictionary.WordCallback {
}
} else {
// Word entered: return only bigrams that match the first char of the typed word
+ @SuppressWarnings("null")
final char currentChar = typedWord.charAt(0);
// TODO: Must pay attention to locale when changing case.
final char currentCharUpper = Character.toUpperCase(currentChar);
@@ -363,34 +355,14 @@ public class Suggest implements Dictionary.WordCallback {
dictionary.getWords(wordComposer, this, proximityInfo);
}
}
- CharSequence autoText = null;
final String typedWordString = typedWord == null ? null : typedWord.toString();
- if (typedWord != null) {
- // Apply quick fix only for the typed word.
- if (mQuickFixesEnabled) {
- final String lowerCaseTypedWord = typedWordString.toLowerCase();
- // Is there an AutoText (also known as Quick Fixes) correction?
- // Capitalize as needed
- autoText = capitalizeWord(mIsAllUpperCase, mIsFirstCharCapitalized, AutoText.get(
- lowerCaseTypedWord, 0, lowerCaseTypedWord.length(), view));
- if (DBG) {
- if (autoText != null) {
- Log.d(TAG, "Auto corrected by AUTOTEXT: " + typedWord + " -> " + autoText);
- }
- }
- }
- }
CharSequence whitelistedWord = capitalizeWord(mIsAllUpperCase, mIsFirstCharCapitalized,
mWhiteListDictionary.getWhiteListedWord(typedWordString));
mAutoCorrection.updateAutoCorrectionStatus(mUnigramDictionaries, wordComposer,
mSuggestions, mScores, typedWord, mAutoCorrectionThreshold, mCorrectionMode,
- autoText, whitelistedWord);
-
- if (autoText != null) {
- mSuggestions.add(0, autoText);
- }
+ whitelistedWord);
if (whitelistedWord != null) {
mSuggestions.add(0, whitelistedWord);