diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java index ef761a06eae2eb16043c996d46e09753c5bd4d2b..8b9c0cac7a53c93e8667f9f0f798273bc3c20992 100644 --- a/src/com/android/inputmethod/latin/LatinIME.java +++ b/src/com/android/inputmethod/latin/LatinIME.java @@ -565,14 +565,18 @@ public class LatinIME extends InputMethodService public void onFinishInput() { super.onFinishInput(); - if (mAfterVoiceInput) mVoiceInput.logInputEnded(); + if (VOICE_INSTALLED && mAfterVoiceInput) { + mVoiceInput.logInputEnded(); + } - mVoiceInput.flushLogs(); + if (VOICE_INSTALLED) { + mVoiceInput.flushLogs(); + } if (mInputView != null) { mInputView.closing(); } - if (VOICE_INSTALLED & mRecognizing) { + if (VOICE_INSTALLED && mRecognizing) { mVoiceInput.cancel(); } }