Loading packages/TtsService/src/android/tts/TtsService.java +21 −16 Original line number Diff line number Diff line Loading @@ -597,8 +597,12 @@ public class TtsService extends Service implements OnCompletionListener { } public void onCompletion(MediaPlayer arg0) { String callingApp = mCurrentSpeechItem.mCallingApp; ArrayList<String> params = mCurrentSpeechItem.mParams; // mCurrentSpeechItem may become null if it is stopped at the same // time it completes. SpeechItem currentSpeechItemCopy = mCurrentSpeechItem; if (currentSpeechItemCopy != null) { String callingApp = currentSpeechItemCopy.mCallingApp; ArrayList<String> params = currentSpeechItemCopy.mParams; String utteranceId = ""; if (params != null) { for (int i = 0; i < params.size() - 1; i = i + 2) { Loading @@ -611,6 +615,7 @@ public class TtsService extends Service implements OnCompletionListener { if (utteranceId.length() > 0) { dispatchUtteranceCompletedCallback(utteranceId, callingApp); } } processSpeechQueue(); } Loading Loading
packages/TtsService/src/android/tts/TtsService.java +21 −16 Original line number Diff line number Diff line Loading @@ -597,8 +597,12 @@ public class TtsService extends Service implements OnCompletionListener { } public void onCompletion(MediaPlayer arg0) { String callingApp = mCurrentSpeechItem.mCallingApp; ArrayList<String> params = mCurrentSpeechItem.mParams; // mCurrentSpeechItem may become null if it is stopped at the same // time it completes. SpeechItem currentSpeechItemCopy = mCurrentSpeechItem; if (currentSpeechItemCopy != null) { String callingApp = currentSpeechItemCopy.mCallingApp; ArrayList<String> params = currentSpeechItemCopy.mParams; String utteranceId = ""; if (params != null) { for (int i = 0; i < params.size() - 1; i = i + 2) { Loading @@ -611,6 +615,7 @@ public class TtsService extends Service implements OnCompletionListener { if (utteranceId.length() > 0) { dispatchUtteranceCompletedCallback(utteranceId, callingApp); } } processSpeechQueue(); } Loading