Merge "[IL58] Simplification"

This commit is contained in:
Jean Chalard 2014-01-16 17:45:59 +00:00 committed by Android (Google) Code Review
commit 9c9c43c0b7
2 changed files with 5 additions and 7 deletions

View file

@ -234,6 +234,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
} }
public void postResumeSuggestions() { public void postResumeSuggestions() {
if (!getOwnerInstance().mSettings.getCurrent().isSuggestionStripVisible()) {
return;
}
removeMessages(MSG_RESUME_SUGGESTIONS); removeMessages(MSG_RESUME_SUGGESTIONS);
sendMessageDelayed(obtainMessage(MSG_RESUME_SUGGESTIONS), mDelayUpdateSuggestions); sendMessageDelayed(obtainMessage(MSG_RESUME_SUGGESTIONS), mDelayUpdateSuggestions);
} }
@ -959,11 +962,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
newSelStart, newSelEnd, false /* shouldFinishComposition */); newSelStart, newSelEnd, false /* shouldFinishComposition */);
} }
// We moved the cursor. If we are touching a word, we need to resume suggestion, // We moved the cursor. If we are touching a word, we need to resume suggestion.
// unless suggestions are off.
if (isSuggestionsStripVisible()) {
mHandler.postResumeSuggestions(); mHandler.postResumeSuggestions();
}
// Reset the last recapitalization. // Reset the last recapitalization.
mInputLogic.mRecapitalizeStatus.deactivate(); mInputLogic.mRecapitalizeStatus.deactivate();
mKeyboardSwitcher.updateShiftState(); mKeyboardSwitcher.updateShiftState();

View file

@ -1061,8 +1061,6 @@ public final class InputLogic {
// recorrection. This is a temporary, stopgap measure that will be removed later. // recorrection. This is a temporary, stopgap measure that will be removed later.
// TODO: remove this. // TODO: remove this.
if (settingsValues.isBrokenByRecorrection()) return; if (settingsValues.isBrokenByRecorrection()) return;
// A simple way to test for support from the TextView.
if (!mLatinIME.isSuggestionsStripVisible()) return;
// Recorrection is not supported in languages without spaces because we don't know // Recorrection is not supported in languages without spaces because we don't know
// how to segment them yet. // how to segment them yet.
if (!settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces) return; if (!settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces) return;