Disable neutral punctuation suggestions

This commit is contained in:
Aleksandras Kostarevas 2024-09-27 18:21:39 +03:00
parent 2ff68bf7cd
commit 7fdf54ec61
2 changed files with 2 additions and 5 deletions

View File

@ -1617,10 +1617,7 @@ public class LatinIMELegacy implements KeyboardActionListener,
// punctuation suggestions (if it's disabled). // punctuation suggestions (if it's disabled).
@Override @Override
public void setNeutralSuggestionStrip() { public void setNeutralSuggestionStrip() {
final SettingsValues currentSettings = mSettings.getCurrent(); final SuggestedWords neutralSuggestions = SuggestedWords.getEmptyInstance();
final SuggestedWords neutralSuggestions = currentSettings.mBigramPredictionEnabled
? SuggestedWords.getEmptyInstance()
: currentSettings.mSpacingAndPunctuations.mSuggestPuncList;
setSuggestedWords(neutralSuggestions); setSuggestedWords(neutralSuggestions);
} }

View File

@ -164,8 +164,8 @@ public class SettingsValues {
final String autoCorrectionThresholdRawValue = mAutoCorrectEnabled final String autoCorrectionThresholdRawValue = mAutoCorrectEnabled
? res.getString(R.string.auto_correction_threshold_mode_index_modest) ? res.getString(R.string.auto_correction_threshold_mode_index_modest)
: res.getString(R.string.auto_correction_threshold_mode_index_off); : res.getString(R.string.auto_correction_threshold_mode_index_off);
mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res);
mTransformerPredictionEnabled = readTransformerPredictionEnabled(prefs, res); mTransformerPredictionEnabled = readTransformerPredictionEnabled(prefs, res);
mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res) || mTransformerPredictionEnabled;
mDoubleSpacePeriodTimeout = res.getInteger(R.integer.config_double_space_period_timeout); mDoubleSpacePeriodTimeout = res.getInteger(R.integer.config_double_space_period_timeout);
mHasHardwareKeyboard = Settings.readHasHardwareKeyboard(res.getConfiguration()); mHasHardwareKeyboard = Settings.readHasHardwareKeyboard(res.getConfiguration());
mEnableMetricsLogging = prefs.getBoolean(Settings.PREF_ENABLE_METRICS_LOGGING, true); mEnableMetricsLogging = prefs.getBoolean(Settings.PREF_ENABLE_METRICS_LOGGING, true);