summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-08 13:06:30 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-08 13:06:30 -0700
commit996b1c8d681268961a9e6518b9a5cbe98ccf0111 (patch)
tree66c3281ff1de03378da546258165318cae40d72a /core/java
parentbdf90a08a22189254274078ed39ec5a1db37a0b3 (diff)
parent409895e374108ef4bfa714e21526710ee05e700b (diff)
downloadframeworks_base-996b1c8d681268961a9e6518b9a5cbe98ccf0111.zip
frameworks_base-996b1c8d681268961a9e6518b9a5cbe98ccf0111.tar.gz
frameworks_base-996b1c8d681268961a9e6518b9a5cbe98ccf0111.tar.bz2
Merge change 3431 into donut
* changes: Moved error status from SpeechServiceRecognizerListener
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/speech/IRecognitionListener.aidl6
-rw-r--r--core/java/android/speech/RecognitionResult.java11
2 files changed, 13 insertions, 4 deletions
diff --git a/core/java/android/speech/IRecognitionListener.aidl b/core/java/android/speech/IRecognitionListener.aidl
index b4abfda..2da2258 100644
--- a/core/java/android/speech/IRecognitionListener.aidl
+++ b/core/java/android/speech/IRecognitionListener.aidl
@@ -45,10 +45,8 @@ interface IRecognitionListener {
void onEndOfSpeech();
/**
- * A network or recognition error occurred.
- * TODO: right now, the error code is given in voice search package
- * (vendor/google/apps/src/com/google/android/voicesearch/speechservice/SpeechServiceListener.java)
- * we need to find a place to define common error code.
+ * A network or recognition error occurred. The code is defined in
+ * {@link android.speech.RecognitionResult}
*/
void onError(in int error);
diff --git a/core/java/android/speech/RecognitionResult.java b/core/java/android/speech/RecognitionResult.java
index c3ac484..8d031fc 100644
--- a/core/java/android/speech/RecognitionResult.java
+++ b/core/java/android/speech/RecognitionResult.java
@@ -27,6 +27,17 @@ import android.os.Parcelable;
* {@hide}
*/
public class RecognitionResult implements Parcelable {
+ /**
+ * Status of the recognize request.
+ */
+ public static final int NETWORK_TIMEOUT = 1; // Network operation timed out.
+ public static final int NETWORK_ERROR = 2; // Other networkrelated errors.
+ public static final int AUDIO_ERROR = 3; // Audio recording error.
+ public static final int SERVER_ERROR = 4; // Server sends error status.
+ public static final int CLIENT_ERROR = 5; // Other client side errors.
+ public static final int SPEECH_TIMEOUT = 6; // No speech input
+ public static final int NO_MATCH = 7; // No recognition result matched.
+ public static final int SERVICE_BUSY = 8; // RecognitionService busy.
/**
* Type of the recognition results.