diff options
author | 2011-03-02 21:34:11 -0800 | |
---|---|---|
committer | 2011-03-03 01:18:08 -0800 | |
commit | 4503e2ea9853c1573f60903d8639d82e39e07c56 (patch) | |
tree | 47d80d521c153fdc11a7c1f3ba028b5a5300e82d /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 424f6ec2bcdfad53f571aa72f2979a0ba30d3ca2 (diff) | |
download | latinime-4503e2ea9853c1573f60903d8639d82e39e07c56.tar.gz latinime-4503e2ea9853c1573f60903d8639d82e39e07c56.tar.xz latinime-4503e2ea9853c1573f60903d8639d82e39e07c56.zip |
Hide shortcut key when the shortcut IME is not enabled
Bug: 3398726
Change-Id: I5e1bfc1fec9047c1c4e4f29fbf79f0fdf9356ffb
Diffstat (limited to '')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index d0d0b723f..feaebb931 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -547,7 +547,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Most such things we decide below in initializeInputAttributesAndGetMode, but we need to // know now whether this is a password text field, because we need to know now whether we // want to enable the voice button. - mVoiceConnector.resetVoiceStates(Utils.isPasswordInputType(attribute.inputType) + final VoiceIMEConnector voiceIme = mVoiceConnector; + voiceIme.resetVoiceStates(Utils.isPasswordInputType(attribute.inputType) || Utils.isVisiblePasswordInputType(attribute.inputType)); initializeInputAttributes(attribute); @@ -562,8 +563,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen loadSettings(attribute); if (mSubtypeSwitcher.isKeyboardMode()) { switcher.loadKeyboard(attribute, - mVoiceConnector.isVoiceButtonEnabled(), - mVoiceConnector.isVoiceButtonOnPrimary()); + mSubtypeSwitcher.isShortcutImeEnabled() && voiceIme.isVoiceButtonEnabled(), + voiceIme.isVoiceButtonOnPrimary()); switcher.updateShiftState(); } @@ -583,7 +584,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen checkRecorrectionOnStart(); inputView.setForeground(true); - mVoiceConnector.onStartInputView(inputView.getWindowToken()); + voiceIme.onStartInputView(inputView.getWindowToken()); if (TRACE) Debug.startMethodTracing("/data/trace/latinime"); } @@ -1930,7 +1931,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } // Reload keyboard because the current language has been changed. mKeyboardSwitcher.loadKeyboard(getCurrentInputEditorInfo(), - mVoiceConnector.isVoiceButtonEnabled(), mVoiceConnector.isVoiceButtonOnPrimary()); + mSubtypeSwitcher.isShortcutImeEnabled() && mVoiceConnector.isVoiceButtonEnabled(), + mVoiceConnector.isVoiceButtonOnPrimary()); initSuggest(); mKeyboardSwitcher.updateShiftState(); } |