Loading packages/TtsService/src/android/tts/TtsService.java +6 −5 Original line number Original line Diff line number Diff line Loading @@ -424,6 +424,11 @@ public class TtsService extends Service implements OnCompletionListener { return sr; return sr; } } private void broadcastTtsQueueProcessingCompleted(){ Intent i = new Intent(Intent.ACTION_TTS_QUEUE_PROCESSING_COMPLETED); sendBroadcast(i); } private void dispatchSpeechCompletedCallbacks(String mark) { private void dispatchSpeechCompletedCallbacks(String mark) { Log.i("TTS callback", "dispatch started"); Log.i("TTS callback", "dispatch started"); // Broadcast to all clients the new value. // Broadcast to all clients the new value. Loading @@ -449,11 +454,7 @@ public class TtsService extends Service implements OnCompletionListener { } } if (mSpeechQueue.size() < 1) { if (mSpeechQueue.size() < 1) { mIsSpeaking = false; mIsSpeaking = false; // Dispatch a completion here as this is the broadcastTtsQueueProcessingCompleted(); // only place where speech completes normally. // Nothing left to say in the queue is a special case // that is always a "mark" - associated text is null. dispatchSpeechCompletedCallbacks(""); return; return; } } Loading Loading
packages/TtsService/src/android/tts/TtsService.java +6 −5 Original line number Original line Diff line number Diff line Loading @@ -424,6 +424,11 @@ public class TtsService extends Service implements OnCompletionListener { return sr; return sr; } } private void broadcastTtsQueueProcessingCompleted(){ Intent i = new Intent(Intent.ACTION_TTS_QUEUE_PROCESSING_COMPLETED); sendBroadcast(i); } private void dispatchSpeechCompletedCallbacks(String mark) { private void dispatchSpeechCompletedCallbacks(String mark) { Log.i("TTS callback", "dispatch started"); Log.i("TTS callback", "dispatch started"); // Broadcast to all clients the new value. // Broadcast to all clients the new value. Loading @@ -449,11 +454,7 @@ public class TtsService extends Service implements OnCompletionListener { } } if (mSpeechQueue.size() < 1) { if (mSpeechQueue.size() < 1) { mIsSpeaking = false; mIsSpeaking = false; // Dispatch a completion here as this is the broadcastTtsQueueProcessingCompleted(); // only place where speech completes normally. // Nothing left to say in the queue is a special case // that is always a "mark" - associated text is null. dispatchSpeechCompletedCallbacks(""); return; return; } } Loading