aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-01-28 00:24:28 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-28 00:24:28 -0800
commitdbd7915611e596dfacf4fa36c5959b4a0534f9d8 (patch)
treec86619abf11455916003e4df37c26bf63d407bf8
parenta15565eca6292ffc96103ec6eb4b99338f525590 (diff)
parenteb00023b9b12e3b42bfd080157066a0f0b39f934 (diff)
downloadlatinime-dbd7915611e596dfacf4fa36c5959b4a0534f9d8.tar.gz
latinime-dbd7915611e596dfacf4fa36c5959b4a0534f9d8.tar.xz
latinime-dbd7915611e596dfacf4fa36c5959b4a0534f9d8.zip
am eb00023b: [IL97] Readability improvement
* commit 'eb00023b9b12e3b42bfd080157066a0f0b39f934': [IL97] Readability improvement
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java21
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);
}
}