Re-evaluate auto-caps earlier.
We have all we know to re-evaluate auto-caps in this case. We don't need to wait until we get the callback from TextView. Bug: 10287972 Change-Id: I87e4e26cd193a001f91fe852ffc5a8f728db2449
This commit is contained in:
parent
d81b9d0276
commit
b7e782d868
1 changed files with 7 additions and 0 deletions
|
@ -1858,6 +1858,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
}
|
}
|
||||||
mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1);
|
mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1);
|
||||||
mHandler.postUpdateSuggestionStrip();
|
mHandler.postUpdateSuggestionStrip();
|
||||||
|
if (!mWordComposer.isComposingWord()) {
|
||||||
|
// If we just removed the last character, auto-caps mode may have changed so we
|
||||||
|
// need to re-evaluate.
|
||||||
|
mKeyboardSwitcher.updateShiftState();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
final SettingsValues currentSettings = mSettings.getCurrent();
|
final SettingsValues currentSettings = mSettings.getCurrent();
|
||||||
if (mLastComposedWord.canRevertCommit()) {
|
if (mLastComposedWord.canRevertCommit()) {
|
||||||
|
@ -1940,6 +1945,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (currentSettings.isSuggestionsRequested(mDisplayOrientation)) {
|
if (currentSettings.isSuggestionsRequested(mDisplayOrientation)) {
|
||||||
restartSuggestionsOnWordBeforeCursorIfAtEndOfWord();
|
restartSuggestionsOnWordBeforeCursorIfAtEndOfWord();
|
||||||
}
|
}
|
||||||
|
// We just removed a character. We need to update the auto-caps state.
|
||||||
|
mKeyboardSwitcher.updateShiftState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue