diff options
author | 2014-01-24 21:47:17 +0900 | |
---|---|---|
committer | 2014-01-28 17:17:58 +0900 | |
commit | eb00023b9b12e3b42bfd080157066a0f0b39f934 (patch) | |
tree | a5dee412e7205a77e7b8f2ec01e50d2158262484 /java/src | |
parent | 95e5e267ac1aca7c5a7db2ceea96716437c6b2fe (diff) | |
download | latinime-eb00023b9b12e3b42bfd080157066a0f0b39f934.tar.gz latinime-eb00023b9b12e3b42bfd080157066a0f0b39f934.tar.xz latinime-eb00023b9b12e3b42bfd080157066a0f0b39f934.zip |
[IL97] Readability improvement
Bug: 8636060
Change-Id: I6b15c7fb91cd4cf23a993541c19842b51e328f8f
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 944fa73c8..c1dfde888 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1020,17 +1020,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private void setSuggestionStripShownInternal(final boolean shown, final boolean needsInputViewShown) { // TODO: Modify this if we support suggestions with hard keyboard - if (onEvaluateInputViewShown() && mSuggestionStripView != null) { - final boolean inputViewShown = mKeyboardSwitcher.isShowingMainKeyboardOrEmojiPalettes(); - final boolean shouldShowSuggestions = shown - && (needsInputViewShown ? inputViewShown : true); - if (isFullscreenMode()) { - mSuggestionStripView.setVisibility( - shouldShowSuggestions ? View.VISIBLE : View.GONE); - } else { - mSuggestionStripView.setVisibility( - shouldShowSuggestions ? View.VISIBLE : View.INVISIBLE); - } + if (!onEvaluateInputViewShown() || null == mSuggestionStripView) { + return; + } + final boolean inputViewShown = mKeyboardSwitcher.isShowingMainKeyboardOrEmojiPalettes(); + final boolean shouldShowSuggestions = shown + && (needsInputViewShown ? inputViewShown : true); + if (shouldShowSuggestions) { + mSuggestionStripView.setVisibility(View.VISIBLE); + } else { + mSuggestionStripView.setVisibility(isFullscreenMode() ? View.GONE : View.INVISIBLE); } } |