diff options
author | 2010-03-07 07:27:05 -0800 | |
---|---|---|
committer | 2010-03-08 16:16:08 -0800 | |
commit | 81c52293f84ce475ac6b1661f4a4b92703405247 (patch) | |
tree | 127716a490d59ff6bfc8d49f3b5193bea0076f9f /src/com/android/inputmethod/voice/VoiceInput.java | |
parent | abd5e5867c25273f32a6ffa63812b62b69d91f2d (diff) | |
download | latinime-81c52293f84ce475ac6b1661f4a4b92703405247.tar.gz latinime-81c52293f84ce475ac6b1661f4a4b92703405247.tar.xz latinime-81c52293f84ce475ac6b1661f4a4b92703405247.zip |
Retain voice input across orientation changes. Fixes 2428545
If an configuration change happens when voice is being captured or
processed, it keeps the voice input state intact and reattaches the
recognition view to the input method.
Diffstat (limited to 'src/com/android/inputmethod/voice/VoiceInput.java')
-rw-r--r-- | src/com/android/inputmethod/voice/VoiceInput.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/inputmethod/voice/VoiceInput.java b/src/com/android/inputmethod/voice/VoiceInput.java index a2e210536..e881856dd 100644 --- a/src/com/android/inputmethod/voice/VoiceInput.java +++ b/src/com/android/inputmethod/voice/VoiceInput.java @@ -162,6 +162,14 @@ public class VoiceInput implements OnClickListener { } /** + * The configuration of the IME changed and may have caused the views to be layed out + * again. Restore the state of the recognition view. + */ + public void onConfigurationChanged() { + mRecognitionView.restoreState(); + } + + /** * @return true if field is blacklisted for voice */ public boolean isBlacklistedField(FieldContext context) { |