Fix isSuggestionsStripVisible when keyboard hidden

When the keyboard is hidden, the suggestion strip is
never visible.

Bug: 8954116
Change-Id: I9f242d07b49ad60b625a22429bb013251e814905
This commit is contained in:
Jean Chalard 2013-05-14 15:05:40 +09:00
parent e69066d11b
commit cb0d1c4c58

View file

@ -2102,16 +2102,25 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
}
private boolean isSuggestionsStripVisible() {
if (mSuggestionStripView == null)
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
if (null == mainKeyboardView || !mainKeyboardView.isShown()) {
return false;
if (mSuggestionStripView.isShowingAddToDictionaryHint())
}
if (mSuggestionStripView == null) {
return false;
}
if (mSuggestionStripView.isShowingAddToDictionaryHint()) {
return true;
if (null == mSettings.getCurrent())
}
if (null == mSettings.getCurrent()) {
return false;
if (!mSettings.getCurrent().isSuggestionStripVisibleInOrientation(mDisplayOrientation))
}
if (!mSettings.getCurrent().isSuggestionStripVisibleInOrientation(mDisplayOrientation)) {
return false;
if (mSettings.getCurrent().isApplicationSpecifiedCompletionsOn())
}
if (mSettings.getCurrent().isApplicationSpecifiedCompletionsOn()) {
return true;
}
return mSettings.getCurrent().isSuggestionsRequested(mDisplayOrientation);
}