Restart suggestions when backspacing into a reverted word.
This is required for the final corrected word to be learned, as learning only occurs when suggestions are active. Note: This is already happening when backspacing into a non-reverted word Bug: 19619907 Bug: 18465402 Change-Id: I99a1d4f0ca0d62a2cdfa24cc0833ce89391715d9main
parent
38b9bffa3f
commit
222f647137
|
@ -1027,6 +1027,20 @@ public final class InputLogic {
|
||||||
revertCommit(inputTransaction, inputTransaction.mSettingsValues);
|
revertCommit(inputTransaction, inputTransaction.mSettingsValues);
|
||||||
StatsUtils.onRevertAutoCorrect();
|
StatsUtils.onRevertAutoCorrect();
|
||||||
StatsUtils.onWordCommitUserTyped(lastComposedWord, mWordComposer.isBatchMode());
|
StatsUtils.onWordCommitUserTyped(lastComposedWord, mWordComposer.isBatchMode());
|
||||||
|
// Restart suggestions when backspacing into a reverted word. This is required for
|
||||||
|
// the final corrected word to be learned, as learning only occurs when suggestions
|
||||||
|
// are active.
|
||||||
|
//
|
||||||
|
// Note: restartSuggestionsOnWordTouchedByCursor is already called for normal
|
||||||
|
// (non-revert) backspace handling.
|
||||||
|
if (inputTransaction.mSettingsValues.isSuggestionsEnabledPerUserSettings()
|
||||||
|
&& inputTransaction.mSettingsValues.mSpacingAndPunctuations
|
||||||
|
.mCurrentLanguageHasSpaces
|
||||||
|
&& !mConnection.isCursorFollowedByWordCharacter(
|
||||||
|
inputTransaction.mSettingsValues.mSpacingAndPunctuations)) {
|
||||||
|
restartSuggestionsOnWordTouchedByCursor(inputTransaction.mSettingsValues,
|
||||||
|
false /* forStartInput */, currentKeyboardScriptId);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mEnteredText != null && mConnection.sameAsTextBeforeCursor(mEnteredText)) {
|
if (mEnteredText != null && mConnection.sameAsTextBeforeCursor(mEnteredText)) {
|
||||||
|
|
Loading…
Reference in New Issue