diff options
author | 2010-11-17 16:35:35 +0900 | |
---|---|---|
committer | 2010-11-18 06:58:49 +0900 | |
commit | 0ed7191b4d1013a0b9d2fd1f26733dee7364871d (patch) | |
tree | 048754db182c80d0e1d71a2cd1a8b641eeb68b95 /java/src/com/android/inputmethod/latin/BaseKeyboardView.java | |
parent | 3a4d9b420f8e15a89145e10ad617e90b6a4e1ecc (diff) | |
download | latinime-0ed7191b4d1013a0b9d2fd1f26733dee7364871d.tar.gz latinime-0ed7191b4d1013a0b9d2fd1f26733dee7364871d.tar.xz latinime-0ed7191b4d1013a0b9d2fd1f26733dee7364871d.zip |
Move functions related to LanguageSwitcher to LatinIMESubtypeSwitcher
Change-Id: I5fa306cf311063ff96b6d45faaca2ffe84cddbf9
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BaseKeyboardView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/BaseKeyboardView.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/BaseKeyboardView.java b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java index f2edd6b04..61978e4f0 100644 --- a/java/src/com/android/inputmethod/latin/BaseKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java @@ -925,17 +925,14 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy { public void showPreview(int keyIndex, PointerTracker tracker) { int oldKeyIndex = mOldPreviewKeyIndex; mOldPreviewKeyIndex = keyIndex; - final boolean isLanguageSwitchEnabled = (mKeyboard instanceof LatinKeyboard) - && ((LatinKeyboard)mKeyboard).isLanguageSwitchEnabled(); // We should re-draw popup preview when 1) we need to hide the preview, 2) we will show // the space key preview and 3) pointer moves off the space key to other letter key, we // should hide the preview of the previous key. final boolean hidePreviewOrShowSpaceKeyPreview = (tracker == null) || tracker.isSpaceKey(keyIndex) || tracker.isSpaceKey(oldKeyIndex); // If key changed and preview is on or the key is space (language switch is enabled) - if (oldKeyIndex != keyIndex - && (mShowPreview - || (hidePreviewOrShowSpaceKeyPreview && isLanguageSwitchEnabled))) { + if (oldKeyIndex != keyIndex && (mShowPreview || (hidePreviewOrShowSpaceKeyPreview + && SubtypeSwitcher.getInstance().isLanguageSwitchEnabled()))) { if (keyIndex == NOT_A_KEY) { mHandler.cancelPopupPreview(); mHandler.dismissPreview(mDelayAfterPreview); |