aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/voice/VoiceInput.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-01-19 20:33:55 +0900
committersatok <satok@google.com>2011-01-19 20:33:55 +0900
commit9c383385d5fb82496d7e7ca57826fc21ec8a6bbd (patch)
treefb22e4f5f76c6b8d9e3833ba837c7fbde018f645 /java/src/com/android/inputmethod/voice/VoiceInput.java
parent6014f1c92b8ea446b98a66429c232cd652f896ef (diff)
parent86497c88d2647dc8af51fc34b6b61ce2c846203c (diff)
downloadlatinime-9c383385d5fb82496d7e7ca57826fc21ec8a6bbd.tar.gz
latinime-9c383385d5fb82496d7e7ca57826fc21ec8a6bbd.tar.xz
latinime-9c383385d5fb82496d7e7ca57826fc21ec8a6bbd.zip
Merge remote branch 'goog/master' into merge
Conflicts: java/src/com/android/inputmethod/latin/Settings.java java/src/com/android/inputmethod/latin/SubtypeSwitcher.java java/src/com/android/inputmethod/voice/VoiceIMEConnector.java Change-Id: If30410c4814c3224f87698c165312494c0efca23
Diffstat (limited to 'java/src/com/android/inputmethod/voice/VoiceInput.java')
-rw-r--r--java/src/com/android/inputmethod/voice/VoiceInput.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/voice/VoiceInput.java b/java/src/com/android/inputmethod/voice/VoiceInput.java
index f77b4dd0d..ffa349fde 100644
--- a/java/src/com/android/inputmethod/voice/VoiceInput.java
+++ b/java/src/com/android/inputmethod/voice/VoiceInput.java
@@ -22,6 +22,7 @@ import com.android.inputmethod.latin.R;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
@@ -129,12 +130,17 @@ public class VoiceInput implements OnClickListener {
private final static int MSG_CLOSE_ERROR_DIALOG = 1;
+ private final static int MSG_RESET = 2;
+
private final Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
- if (msg.what == MSG_CLOSE_ERROR_DIALOG) {
+ if (msg.what == MSG_RESET || msg.what == MSG_CLOSE_ERROR_DIALOG) {
mState = DEFAULT;
mRecognitionView.finish();
+ }
+
+ if (msg.what == MSG_CLOSE_ERROR_DIALOG) {
mUiListener.onCancelVoice();
}
}
@@ -277,8 +283,9 @@ 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() {
+ public void onConfigurationChanged(Configuration configuration) {
mRecognitionView.restoreState();
+ mRecognitionView.getView().dispatchConfigurationChanged(configuration);
}
/**
@@ -509,7 +516,7 @@ public class VoiceInput implements OnClickListener {
mState = DEFAULT;
// Remove all pending tasks (e.g., timers to cancel voice input)
- mHandler.removeMessages(MSG_CLOSE_ERROR_DIALOG);
+ mHandler.removeMessages(MSG_RESET);
mSpeechRecognizer.cancel();
mUiListener.onCancelVoice();