diff options
author | 2011-11-21 14:58:32 -0800 | |
---|---|---|
committer | 2011-11-21 16:32:46 -0800 | |
commit | e7eac906c0a14b644d457beeb73a407fa1b63673 (patch) | |
tree | 7f58e6e5f1e8363928e750bd5790729c720df9cf /java/src/com/android/inputmethod/deprecated/VoiceProxy.java | |
parent | 19cbdfc92f171375b73204f0c49d9f84883bea39 (diff) | |
download | latinime-e7eac906c0a14b644d457beeb73a407fa1b63673.tar.gz latinime-e7eac906c0a14b644d457beeb73a407fa1b63673.tar.xz latinime-e7eac906c0a14b644d457beeb73a407fa1b63673.zip |
Pending onStartInputView only if the EditorInfo is identical
Bug: 5604372
Change-Id: I2a88cf15b07eebd29e43e460f6ec758432181b01
Diffstat (limited to 'java/src/com/android/inputmethod/deprecated/VoiceProxy.java')
-rw-r--r-- | java/src/com/android/inputmethod/deprecated/VoiceProxy.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/deprecated/VoiceProxy.java b/java/src/com/android/inputmethod/deprecated/VoiceProxy.java index 3f8c2ef8f..a013ebca9 100644 --- a/java/src/com/android/inputmethod/deprecated/VoiceProxy.java +++ b/java/src/com/android/inputmethod/deprecated/VoiceProxy.java @@ -695,12 +695,12 @@ public class VoiceProxy implements VoiceInput.UiListener { && !mVoiceInput.isBlacklistedField(fieldContext); } - private boolean shouldShowVoiceButton(FieldContext fieldContext, EditorInfo attribute) { + private boolean shouldShowVoiceButton(FieldContext fieldContext, EditorInfo editorInfo) { @SuppressWarnings("deprecation") final boolean noMic = Utils.inPrivateImeOptions(null, - LatinIME.IME_OPTION_NO_MICROPHONE_COMPAT, attribute) + LatinIME.IME_OPTION_NO_MICROPHONE_COMPAT, editorInfo) || Utils.inPrivateImeOptions(mService.getPackageName(), - LatinIME.IME_OPTION_NO_MICROPHONE, attribute); + LatinIME.IME_OPTION_NO_MICROPHONE, editorInfo); return ENABLE_VOICE_BUTTON && fieldCanDoVoice(fieldContext) && !noMic && SpeechRecognizer.isRecognitionAvailable(mService); } @@ -709,7 +709,7 @@ public class VoiceProxy implements VoiceInput.UiListener { return SpeechRecognizer.isRecognitionAvailable(context); } - public void loadSettings(EditorInfo attribute, SharedPreferences sp) { + public void loadSettings(EditorInfo editorInfo, SharedPreferences sp) { if (!VOICE_INSTALLED) { return; } @@ -723,7 +723,7 @@ public class VoiceProxy implements VoiceInput.UiListener { final String voiceMode = sp.getString(PREF_VOICE_MODE, mService.getString(R.string.voice_mode_main)); mVoiceButtonEnabled = !voiceMode.equals(mService.getString(R.string.voice_mode_off)) - && shouldShowVoiceButton(makeFieldContext(), attribute); + && shouldShowVoiceButton(makeFieldContext(), editorInfo); mVoiceButtonOnPrimary = voiceMode.equals(mService.getString(R.string.voice_mode_main)); } |