Merge "Cleanup, part 2 (C2)"
This commit is contained in:
commit
1c3c0ff1c3
1 changed files with 3 additions and 7 deletions
|
@ -76,9 +76,7 @@ public class SettingsValues {
|
||||||
@SuppressWarnings("unused") // TODO: Use this
|
@SuppressWarnings("unused") // TODO: Use this
|
||||||
private final String mKeyPreviewPopupDismissDelayRawValue;
|
private final String mKeyPreviewPopupDismissDelayRawValue;
|
||||||
public final boolean mUseContactsDict;
|
public final boolean mUseContactsDict;
|
||||||
// Suggestion: use bigrams to adjust scores of suggestions obtained from unigram dictionary
|
// Use bigrams to predict the next word when there is no input for it yet
|
||||||
public final boolean mBigramSuggestionEnabled;
|
|
||||||
// Prediction: use bigrams to predict the next word when there is no input for it yet
|
|
||||||
public final boolean mBigramPredictionEnabled;
|
public final boolean mBigramPredictionEnabled;
|
||||||
public final boolean mEnableSuggestionSpanInsertion;
|
public final boolean mEnableSuggestionSpanInsertion;
|
||||||
@SuppressWarnings("unused") // TODO: Use this
|
@SuppressWarnings("unused") // TODO: Use this
|
||||||
|
@ -157,9 +155,7 @@ public class SettingsValues {
|
||||||
Integer.toString(res.getInteger(R.integer.config_key_preview_linger_timeout)));
|
Integer.toString(res.getInteger(R.integer.config_key_preview_linger_timeout)));
|
||||||
mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
|
mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
|
||||||
mAutoCorrectEnabled = isAutoCorrectEnabled(res, mAutoCorrectionThresholdRawValue);
|
mAutoCorrectEnabled = isAutoCorrectEnabled(res, mAutoCorrectionThresholdRawValue);
|
||||||
mBigramSuggestionEnabled = mAutoCorrectEnabled;
|
mBigramPredictionEnabled = isBigramPredictionEnabled(prefs, res);
|
||||||
mBigramPredictionEnabled = mBigramSuggestionEnabled
|
|
||||||
&& isBigramPredictionEnabled(prefs, res);
|
|
||||||
// TODO: remove mEnableSuggestionSpanInsertion. It's always true.
|
// TODO: remove mEnableSuggestionSpanInsertion. It's always true.
|
||||||
mEnableSuggestionSpanInsertion = true;
|
mEnableSuggestionSpanInsertion = true;
|
||||||
mVibrationDurationSettingsRawValue =
|
mVibrationDurationSettingsRawValue =
|
||||||
|
@ -214,7 +210,7 @@ public class SettingsValues {
|
||||||
private int createCorrectionMode() {
|
private int createCorrectionMode() {
|
||||||
final boolean shouldAutoCorrect = mAutoCorrectEnabled
|
final boolean shouldAutoCorrect = mAutoCorrectEnabled
|
||||||
&& !mInputAttributes.mInputTypeNoAutoCorrect;
|
&& !mInputAttributes.mInputTypeNoAutoCorrect;
|
||||||
if (mBigramSuggestionEnabled && shouldAutoCorrect) return Suggest.CORRECTION_FULL_BIGRAM;
|
if (shouldAutoCorrect) return Suggest.CORRECTION_FULL_BIGRAM;
|
||||||
return shouldAutoCorrect ? Suggest.CORRECTION_FULL : Suggest.CORRECTION_NONE;
|
return shouldAutoCorrect ? Suggest.CORRECTION_FULL : Suggest.CORRECTION_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue