From a19ac0f639e90781fb1755d5940867dfd55f4d5d Mon Sep 17 00:00:00 2001 From: Charles Chen Date: Fri, 19 Nov 2010 10:34:47 -0800 Subject: [PATCH] Removing logs of text that is being spoken. Change-Id: I12624e51eb093b6ee464fc11275046a9e5100925 --- .../src/android/tts/TtsService.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java index c977ba3dac518..08bbfb28c29f7 100755 --- a/packages/TtsService/src/android/tts/TtsService.java +++ b/packages/TtsService/src/android/tts/TtsService.java @@ -496,7 +496,7 @@ public class TtsService extends Service implements OnCompletionListener { * engines. */ private int speak(String callingApp, String text, int queueMode, ArrayList 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 class TtsService extends Service implements OnCompletionListener { } } - 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 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 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 @@ public class TtsService extends Service implements OnCompletionListener { 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 @@ public class TtsService extends Service implements OnCompletionListener { * * @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); } /**