Cleanup, part 9 (C9)

Change-Id: Ifb15553824915d0634aea83689302c2418b093f3
main
Jean Chalard 2012-06-16 11:06:29 +09:00
parent ecc6430155
commit e8bb8351d6
2 changed files with 3 additions and 11 deletions

View File

@ -1894,14 +1894,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
*/
private void commitChosenWord(final CharSequence chosenWord, final int commitType,
final int separatorCode) {
if (mCurrentSettings.mEnableSuggestionSpanInsertion) {
final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions();
mConnection.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan(
this, chosenWord, suggestedWords, mIsMainDictionaryAvailable),
1);
} else {
mConnection.commitText(chosenWord, 1);
}
final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions();
mConnection.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan(
this, chosenWord, suggestedWords, mIsMainDictionaryAvailable), 1);
if (ProductionFlag.IS_EXPERIMENTAL) {
ResearchLogger.latinIME_commitText(chosenWord);
}

View File

@ -78,7 +78,6 @@ public class SettingsValues {
public final boolean mUseContactsDict;
// Use bigrams to predict the next word when there is no input for it yet
public final boolean mBigramPredictionEnabled;
public final boolean mEnableSuggestionSpanInsertion;
@SuppressWarnings("unused") // TODO: Use this
private final int mVibrationDurationSettingsRawValue;
@SuppressWarnings("unused") // TODO: Use this
@ -156,8 +155,6 @@ public class SettingsValues {
mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
mAutoCorrectEnabled = isAutoCorrectEnabled(res, mAutoCorrectionThresholdRawValue);
mBigramPredictionEnabled = isBigramPredictionEnabled(prefs, res);
// TODO: remove mEnableSuggestionSpanInsertion. It's always true.
mEnableSuggestionSpanInsertion = true;
mVibrationDurationSettingsRawValue =
prefs.getInt(Settings.PREF_VIBRATION_DURATION_SETTINGS, -1);
mKeypressSoundVolumeRawValue = prefs.getFloat(Settings.PREF_KEYPRESS_SOUND_VOLUME, -1.0f);