aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-21 02:25:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-21 02:25:34 -0700
commitd85bc7221c5300e9b0be2bc1b434303925cfec39 (patch)
tree5194c5de268993aee9eb3f2ef1818eff6ba9422a /java/src/com/android/inputmethod/latin/LatinIME.java
parent22ed2d3c491370917cc86f413cbc8a1052cd0708 (diff)
parent055265684bdc049db54c3ec2a7fa5404ff36a608 (diff)
downloadlatinime-d85bc7221c5300e9b0be2bc1b434303925cfec39.tar.gz
latinime-d85bc7221c5300e9b0be2bc1b434303925cfec39.tar.xz
latinime-d85bc7221c5300e9b0be2bc1b434303925cfec39.zip
Merge "Revert "Guard unused voice functions""
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e5d2f7578..5d8fd3411 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -542,15 +542,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
TextEntryState.reset();
- if (attribute != null) {
- // 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.
- mVoiceProxy.resetVoiceStates(
- InputTypeCompatUtils.isPasswordInputType(attribute.inputType)
- || InputTypeCompatUtils.isVisiblePasswordInputType(
- attribute.inputType));
- }
+ // 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.
+ final VoiceProxy voiceIme = mVoiceProxy;
+ voiceIme.resetVoiceStates(InputTypeCompatUtils.isPasswordInputType(attribute.inputType)
+ || InputTypeCompatUtils.isVisiblePasswordInputType(attribute.inputType));
initializeInputAttributes(attribute);
@@ -576,8 +573,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (mSubtypeSwitcher.isKeyboardMode()) {
switcher.loadKeyboard(attribute,
- mSubtypeSwitcher.isShortcutImeEnabled() && mVoiceProxy.isVoiceButtonEnabled(),
- mVoiceProxy.isVoiceButtonOnPrimary());
+ mSubtypeSwitcher.isShortcutImeEnabled() && voiceIme.isVoiceButtonEnabled(),
+ voiceIme.isVoiceButtonOnPrimary());
switcher.updateShiftState();
}
@@ -595,7 +592,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// If we just entered a text field, maybe it has some old text that requires correction
mRecorrection.checkRecorrectionOnStart();
- mVoiceProxy.onStartInputView(inputView.getWindowToken());
+ voiceIme.onStartInputView(inputView.getWindowToken());
if (TRACE) Debug.startMethodTracing("/data/trace/latinime");
}