Merge "Removing logs of text that is being spoken."
diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java
index c977ba3..08bbfb2 100755
--- a/packages/TtsService/src/android/tts/TtsService.java
+++ b/packages/TtsService/src/android/tts/TtsService.java
@@ -496,7 +496,7 @@
* engines.
*/
private int speak(String callingApp, String text, int queueMode, ArrayList<String> params) {
- Log.v(SERVICE_TAG, "TTS service received " + text);
+ // Log.v(SERVICE_TAG, "TTS service received " + text);
if (queueMode == TextToSpeech.QUEUE_FLUSH) {
stop(callingApp);
} else if (queueMode == 2) {
@@ -705,27 +705,27 @@
}
}
- public void onCompletion(MediaPlayer arg0) {
- // 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) {
- String param = params.get(i);
- if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)) {
- utteranceId = params.get(i + 1);
- }
- }
- }
- if (utteranceId.length() > 0) {
- dispatchUtteranceCompletedCallback(utteranceId, callingApp);
- }
- }
- processSpeechQueue();
+ public void onCompletion(MediaPlayer arg0) {
+ // 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) {
+ String param = params.get(i);
+ if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)) {
+ utteranceId = params.get(i + 1);
+ }
+ }
+ }
+ if (utteranceId.length() > 0) {
+ dispatchUtteranceCompletedCallback(utteranceId, callingApp);
+ }
+ }
+ processSpeechQueue();
}
private int playSilence(String callingApp, long duration, int queueMode,
@@ -1064,7 +1064,7 @@
SoundResource sr = getSoundResource(mCurrentSpeechItem);
// Synth speech as needed - synthesizer should call
// processSpeechQueue to continue running the queue
- Log.v(SERVICE_TAG, "TTS processing: " + mCurrentSpeechItem.mText);
+ // Log.v(SERVICE_TAG, "TTS processing: " + mCurrentSpeechItem.mText);
if (sr == null) {
if (mCurrentSpeechItem.mType == SpeechItem.TEXT) {
mCurrentSpeechItem = splitCurrentTextIfNeeded(mCurrentSpeechItem);
@@ -1462,8 +1462,8 @@
*
* @return SUCCESS or ERROR as defined in android.speech.tts.TextToSpeech.
*/
- public int setEngineByPackageName(String packageName) {
- return mSelf.setEngine(packageName);
+ public int setEngineByPackageName(String packageName) {
+ return mSelf.setEngine(packageName);
}
/**