am eb00023b: [IL97] Readability improvement

* commit 'eb00023b9b12e3b42bfd080157066a0f0b39f934':
  [IL97] Readability improvement
main
Jean Chalard 2014-01-28 00:24:28 -08:00 committed by Android Git Automerger
commit dbd7915611
1 changed files with 10 additions and 11 deletions

View File

@ -1020,17 +1020,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private void setSuggestionStripShownInternal(final boolean shown, private void setSuggestionStripShownInternal(final boolean shown,
final boolean needsInputViewShown) { final boolean needsInputViewShown) {
// TODO: Modify this if we support suggestions with hard keyboard // TODO: Modify this if we support suggestions with hard keyboard
if (onEvaluateInputViewShown() && mSuggestionStripView != null) { if (!onEvaluateInputViewShown() || null == mSuggestionStripView) {
final boolean inputViewShown = mKeyboardSwitcher.isShowingMainKeyboardOrEmojiPalettes(); return;
final boolean shouldShowSuggestions = shown }
&& (needsInputViewShown ? inputViewShown : true); final boolean inputViewShown = mKeyboardSwitcher.isShowingMainKeyboardOrEmojiPalettes();
if (isFullscreenMode()) { final boolean shouldShowSuggestions = shown
mSuggestionStripView.setVisibility( && (needsInputViewShown ? inputViewShown : true);
shouldShowSuggestions ? View.VISIBLE : View.GONE); if (shouldShowSuggestions) {
} else { mSuggestionStripView.setVisibility(View.VISIBLE);
mSuggestionStripView.setVisibility( } else {
shouldShowSuggestions ? View.VISIBLE : View.INVISIBLE); mSuggestionStripView.setVisibility(isFullscreenMode() ? View.GONE : View.INVISIBLE);
}
} }
} }