aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java19
1 files changed, 7 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index c2483eba2..944fa73c8 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1011,8 +1011,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);
}
@@ -1035,10 +1034,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
- private void setSuggestionStripShown(final boolean shown) {
- setSuggestionStripShownInternal(shown, /* needsInputViewShown */true);
- }
-
private int getAdjustedBackingViewHeight() {
final int currentHeight = mKeyPreviewBackingView.getHeight();
if (currentHeight > 0) {
@@ -1330,7 +1325,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, SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
@@ -1350,6 +1345,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// the practice.
mInputLogic.mConnection.setComposingText(textWithUnderline, 1);
}
+ setSuggestionStripShownInternal(shouldShow, true /* needsInputViewShown */);
}
// TODO[IL]: Move this out of LatinIME.
@@ -1438,8 +1434,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);
@@ -1552,11 +1547,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(