summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech/RecognitionService.java
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2010-03-29 18:31:19 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2010-03-30 11:14:55 -0700
commit2a5d9f9b577376768372837723f0f42098aba13b (patch)
tree02a64c234d64f153081c67bd119b207b07588544 /core/java/android/speech/RecognitionService.java
parentd4610977d9217cbd70dd59f61914c74d1ca61036 (diff)
downloadframeworks_base-2a5d9f9b577376768372837723f0f42098aba13b.zip
frameworks_base-2a5d9f9b577376768372837723f0f42098aba13b.tar.gz
frameworks_base-2a5d9f9b577376768372837723f0f42098aba13b.tar.bz2
Fix bug 2553592 API REVIEW: android.speech
Change 1 of 4 Notes from API Council review: Rename RecognitionManager to SpeechRecognizer Change-Id: I892c0d714d928d5e31575c72b6a36281fc4c7a8a
Diffstat (limited to 'core/java/android/speech/RecognitionService.java')
-rw-r--r--core/java/android/speech/RecognitionService.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/java/android/speech/RecognitionService.java b/core/java/android/speech/RecognitionService.java
index 941b70c..5a0959a 100644
--- a/core/java/android/speech/RecognitionService.java
+++ b/core/java/android/speech/RecognitionService.java
@@ -89,7 +89,7 @@ public abstract class RecognitionService extends Service {
RecognitionService.this.onStartListening(intent, mCurrentCallback);
} else {
try {
- listener.onError(RecognitionManager.ERROR_RECOGNIZER_BUSY);
+ listener.onError(SpeechRecognizer.ERROR_RECOGNIZER_BUSY);
} catch (RemoteException e) {
Log.d(TAG, "onError call from startListening failed");
}
@@ -100,10 +100,10 @@ public abstract class RecognitionService extends Service {
private void dispatchStopListening(IRecognitionListener listener) {
try {
if (mCurrentCallback == null) {
- listener.onError(RecognitionManager.ERROR_CLIENT);
+ listener.onError(SpeechRecognizer.ERROR_CLIENT);
Log.w(TAG, "stopListening called with no preceding startListening - ignoring");
} else if (mCurrentCallback.mListener.asBinder() != listener.asBinder()) {
- listener.onError(RecognitionManager.ERROR_RECOGNIZER_BUSY);
+ listener.onError(SpeechRecognizer.ERROR_RECOGNIZER_BUSY);
Log.w(TAG, "stopListening called by other caller than startListening - ignoring");
} else { // the correct state
RecognitionService.this.onStopListening(mCurrentCallback);
@@ -175,7 +175,7 @@ public abstract class RecognitionService extends Service {
}
try {
Log.e(TAG, "call for recognition service without RECORD_AUDIO permissions");
- listener.onError(RecognitionManager.ERROR_INSUFFICIENT_PERMISSIONS);
+ listener.onError(SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS);
} catch (RemoteException re) {
Log.e(TAG, "sending ERROR_INSUFFICIENT_PERMISSIONS message failed", re);
}
@@ -252,7 +252,7 @@ public abstract class RecognitionService extends Service {
/**
* The service should call this method when a network or recognition error occurred.
*
- * @param error code is defined in {@link RecognitionManager}
+ * @param error code is defined in {@link SpeechRecognizer}
*/
public void error(int error) throws RemoteException {
mCurrentCallback = null;
@@ -263,12 +263,12 @@ public abstract class RecognitionService extends Service {
* The service should call this method when partial recognition results are available. This
* method can be called at any time between {@link #beginningOfSpeech()} and
* {@link #results(Bundle)} when partial results are ready. This method may be called zero,
- * one or multiple times for each call to {@link RecognitionManager#startListening(Intent)},
+ * one or multiple times for each call to {@link SpeechRecognizer#startListening(Intent)},
* depending on the speech recognition service implementation.
*
* @param partialResults the returned results. To retrieve the results in
* ArrayList&lt;String&gt; format use {@link Bundle#getStringArrayList(String)} with
- * {@link RecognitionManager#RESULTS_RECOGNITION} as a parameter
+ * {@link SpeechRecognizer#RESULTS_RECOGNITION} as a parameter
*/
public void partialResults(Bundle partialResults) throws RemoteException {
mListener.onPartialResults(partialResults);
@@ -289,7 +289,7 @@ public abstract class RecognitionService extends Service {
*
* @param results the recognition results. To retrieve the results in {@code
* ArrayList&lt;String&gt;} format use {@link Bundle#getStringArrayList(String)} with
- * {@link RecognitionManager#RESULTS_RECOGNITION} as a parameter
+ * {@link SpeechRecognizer#RESULTS_RECOGNITION} as a parameter
*/
public void results(Bundle results) throws RemoteException {
mCurrentCallback = null;