summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/speech')
-rw-r--r--core/java/android/speech/tts/ITextToSpeechCallback.aidl7
-rw-r--r--core/java/android/speech/tts/TextToSpeech.java10
-rw-r--r--core/java/android/speech/tts/TextToSpeechService.java20
3 files changed, 4 insertions, 33 deletions
diff --git a/core/java/android/speech/tts/ITextToSpeechCallback.aidl b/core/java/android/speech/tts/ITextToSpeechCallback.aidl
index 96f7e0e..899515f 100644
--- a/core/java/android/speech/tts/ITextToSpeechCallback.aidl
+++ b/core/java/android/speech/tts/ITextToSpeechCallback.aidl
@@ -43,13 +43,6 @@ oneway interface ITextToSpeechCallback {
void onStop(String utteranceId);
/**
- * Tells the client that the synthesis failed, and fallback synthesis will be attempted.
- *
- * @param utteranceId Unique id identifying synthesis request.
- */
- void onFallback(String utteranceId);
-
- /**
* Tells the client that the synthesis has failed.
*
* @param utteranceId Unique id identifying synthesis request.
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index ac9044a..46077ed 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -1945,15 +1945,13 @@ public class TextToSpeech {
private final ITextToSpeechCallback.Stub mCallback = new ITextToSpeechCallback.Stub() {
public void onStop(String utteranceId) throws RemoteException {
- // do nothing
+ UtteranceProgressListener listener = mUtteranceProgressListener;
+ if (listener != null) {
+ listener.onDone(utteranceId);
+ }
};
@Override
- public void onFallback(String utteranceId) throws RemoteException {
- // do nothing
- }
-
- @Override
public void onSuccess(String utteranceId) {
UtteranceProgressListener listener = mUtteranceProgressListener;
if (listener != null) {
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java
index ecfb8e0..a0743f7 100644
--- a/core/java/android/speech/tts/TextToSpeechService.java
+++ b/core/java/android/speech/tts/TextToSpeechService.java
@@ -592,14 +592,12 @@ public abstract class TextToSpeechService extends Service {
}
interface UtteranceProgressDispatcher {
- public void dispatchOnFallback();
public void dispatchOnStop();
public void dispatchOnSuccess();
public void dispatchOnStart();
public void dispatchOnError(int errorCode);
}
-
/** Set of parameters affecting audio output. */
static class AudioOutputParams {
/**
@@ -770,14 +768,6 @@ public abstract class TextToSpeechService extends Service {
}
@Override
- public void dispatchOnFallback() {
- final String utteranceId = getUtteranceId();
- if (utteranceId != null) {
- mCallbacks.dispatchOnFallback(getCallerIdentity(), utteranceId);
- }
- }
-
- @Override
public void dispatchOnStart() {
final String utteranceId = getUtteranceId();
if (utteranceId != null) {
@@ -1336,16 +1326,6 @@ public abstract class TextToSpeechService extends Service {
}
}
- public void dispatchOnFallback(Object callerIdentity, String utteranceId) {
- ITextToSpeechCallback cb = getCallbackFor(callerIdentity);
- if (cb == null) return;
- try {
- cb.onFallback(utteranceId);
- } catch (RemoteException e) {
- Log.e(TAG, "Callback onFallback failed: " + e);
- }
- }
-
public void dispatchOnStop(Object callerIdentity, String utteranceId) {
ITextToSpeechCallback cb = getCallbackFor(callerIdentity);
if (cb == null) return;