aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-09-08 09:44:41 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-08 09:44:41 +0000
commit51ca9f9acaaa8e919c286d5fa863878a15a06dda (patch)
tree40a860bdffcbf37d7d8bc59d69cef368fcabb7db /java/src/com/android/inputmethod/latin/LatinIME.java
parent9c576fcba5f57c67253f3f269050bdbdb8e90705 (diff)
parent653546a618126ed6cdf154b68cc2faf000789d61 (diff)
downloadlatinime-51ca9f9acaaa8e919c286d5fa863878a15a06dda.tar.gz
latinime-51ca9f9acaaa8e919c286d5fa863878a15a06dda.tar.xz
latinime-51ca9f9acaaa8e919c286d5fa863878a15a06dda.zip
am 653546a6: am c3fac52d: am 1f74ba17: am cb077f75: Merge "Resolve an old TODO." into lmp-dev
* commit '653546a618126ed6cdf154b68cc2faf000789d61': Resolve an old TODO.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index c55acd462..507d1959b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1075,12 +1075,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public void onComputeInsets(final InputMethodService.Insets outInsets) {
super.onComputeInsets(outInsets);
+ final SettingsValues settingsValues = mSettings.getCurrent();
final View visibleKeyboardView = mKeyboardSwitcher.getVisibleKeyboardView();
if (visibleKeyboardView == null || !hasSuggestionStripView()) {
return;
}
final int inputHeight = mInputView.getHeight();
- final boolean hasHardwareKeyboard = mKeyboardSwitcher.hasHardwareKeyboard();
+ final boolean hasHardwareKeyboard = settingsValues.mHasHardwareKeyboard;
if (hasHardwareKeyboard && visibleKeyboardView.getVisibility() == View.GONE) {
// If there is a hardware keyboard and a visible software keyboard view has been hidden,
// no visual element will be shown on the screen.
@@ -1116,7 +1117,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public boolean onShowInputRequested(final int flags, final boolean configChange) {
- if ((flags & InputMethod.SHOW_EXPLICIT) == 0 && mKeyboardSwitcher.hasHardwareKeyboard()) {
+ final SettingsValues settingsValues = mSettings.getCurrent();
+ if ((flags & InputMethod.SHOW_EXPLICIT) == 0 && settingsValues.mHasHardwareKeyboard) {
// Even when IME is implicitly shown and physical keyboard is connected, we should
// show {@link InputView}.
// See {@link InputMethodService#onShowInputRequested(int,boolean)}.
@@ -1127,7 +1129,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public boolean onEvaluateFullscreenMode() {
- if (mKeyboardSwitcher.hasHardwareKeyboard()) {
+ final SettingsValues settingsValues = mSettings.getCurrent();
+ if (settingsValues.mHasHardwareKeyboard) {
// If there is a hardware keyboard, disable full screen mode.
return false;
}