diff options
author | 2014-01-28 07:31:31 +0000 | |
---|---|---|
committer | 2014-01-28 07:31:31 +0000 | |
commit | 7593f93565766be82365ba4af8d947e7b5e08a50 (patch) | |
tree | bc1c8fa7215b6c652497530e3b9ea65f86bbceb8 /java/src | |
parent | 02b087090e9a4fe1a388bd18939711f988931744 (diff) | |
parent | 90916143b677bca41d89e137e4491cec5a469b85 (diff) | |
download | latinime-7593f93565766be82365ba4af8d947e7b5e08a50.tar.gz latinime-7593f93565766be82365ba4af8d947e7b5e08a50.tar.xz latinime-7593f93565766be82365ba4af8d947e7b5e08a50.zip |
Merge "[IL95] Inline a method that's always called in sequence"
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index efc14fc86..7defa4529 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1010,8 +1010,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen false /* isObsoleteSuggestions */, false /* isPrediction */); // When in fullscreen mode, show completions generated by the application - setSuggestedWords(suggestedWords); - setSuggestionStripShown(true); + setSuggestedWords(suggestedWords, true /* shouldShow */); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions); } @@ -1329,7 +1328,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } // TODO[IL]: Define a clear interface for this - public void setSuggestedWords(final SuggestedWords words) { + public void setSuggestedWords(final SuggestedWords words, final boolean shouldShow) { if (mSuggestionStripView != null) { mSuggestionStripView.setSuggestions(words); mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect); @@ -1348,6 +1347,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // the practice. mInputLogic.mConnection.setComposingText(textWithUnderline, 1); } + setSuggestionStripShown(shouldShow); } // TODO[IL]: Move this out of LatinIME. @@ -1436,8 +1436,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (SuggestedWords.EMPTY != suggestedWords) { mInputLogic.mWordComposer.setAutoCorrection(autoCorrection); } - setSuggestedWords(suggestedWords); - setSuggestionStripShown(isSuggestionsStripVisible()); + setSuggestedWords(suggestedWords, isSuggestionsStripVisible()); // Cache the auto-correction in accessibility code so we can speak it if the user // touches a key that will insert it. AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord); @@ -1550,11 +1549,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public void setNeutralSuggestionStrip() { final SettingsValues currentSettings = mSettings.getCurrent(); if (currentSettings.mBigramPredictionEnabled) { - setSuggestedWords(SuggestedWords.EMPTY); + setSuggestedWords(SuggestedWords.EMPTY, isSuggestionsStripVisible()); } else { - setSuggestedWords(currentSettings.mSpacingAndPunctuations.mSuggestPuncList); + setSuggestedWords(currentSettings.mSpacingAndPunctuations.mSuggestPuncList, + isSuggestionsStripVisible()); } - setSuggestionStripShown(isSuggestionsStripVisible()); } public void unsetIsAutoCorrectionIndicatorOnAndCallShowSuggestionStrip( |