Add some comments about resuming auto-suggestion
Bug: 5846646 Change-Id: Ib2c76ec173972eb7acadbfaae7e930849d546721
This commit is contained in:
parent
1602540764
commit
72d285f4d7
1 changed files with 5 additions and 0 deletions
|
@ -1372,6 +1372,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
ic.deleteSurroundingText(1, 0);
|
ic.deleteSurroundingText(1, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// We should be very careful about auto-correction cancellation and suggestion
|
||||||
|
// resuming here. The behavior needs to be different according to text field types,
|
||||||
|
// and it would be much clearer to test for them explicitly here rather than
|
||||||
|
// relying on implicit values like "whether the suggestion strip is displayed".
|
||||||
if (mWordComposer.didAutoCorrectToAnotherWord()) {
|
if (mWordComposer.didAutoCorrectToAnotherWord()) {
|
||||||
Utils.Stats.onAutoCorrectionCancellation();
|
Utils.Stats.onAutoCorrectionCancellation();
|
||||||
cancelAutoCorrect(ic);
|
cancelAutoCorrect(ic);
|
||||||
|
@ -1391,6 +1395,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See the comment above: must be careful about resuming auto-suggestion.
|
||||||
if (mSuggestionsView != null && mSuggestionsView.dismissAddToDictionaryHint()) {
|
if (mSuggestionsView != null && mSuggestionsView.dismissAddToDictionaryHint()) {
|
||||||
// Go back to the suggestion mode if the user canceled the
|
// Go back to the suggestion mode if the user canceled the
|
||||||
// "Touch again to save".
|
// "Touch again to save".
|
||||||
|
|
Loading…
Reference in a new issue