Merge change 3431 into donut
* changes: Moved error status from SpeechServiceRecognizerListener
This commit is contained in:
@@ -45,10 +45,8 @@ interface IRecognitionListener {
|
|||||||
void onEndOfSpeech();
|
void onEndOfSpeech();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A network or recognition error occurred.
|
* A network or recognition error occurred. The code is defined in
|
||||||
* TODO: right now, the error code is given in voice search package
|
* {@link android.speech.RecognitionResult}
|
||||||
* (vendor/google/apps/src/com/google/android/voicesearch/speechservice/SpeechServiceListener.java)
|
|
||||||
* we need to find a place to define common error code.
|
|
||||||
*/
|
*/
|
||||||
void onError(in int error);
|
void onError(in int error);
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,17 @@ import android.os.Parcelable;
|
|||||||
* {@hide}
|
* {@hide}
|
||||||
*/
|
*/
|
||||||
public class RecognitionResult implements Parcelable {
|
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.
|
* Type of the recognition results.
|
||||||
|
|||||||
Reference in New Issue
Block a user