summaryrefslogtreecommitdiffstats
path: root/packages/TtsService/src/android/tts/TtsService.java
diff options
context:
space:
mode:
authorCharles Chen <clchen@google.com>2010-11-19 10:34:47 -0800
committerCharles Chen <clchen@google.com>2010-11-19 10:50:03 -0800
commita19ac0f639e90781fb1755d5940867dfd55f4d5d (patch)
tree5bdf4f4464fdad9c5c3f931ae4885fa127431d3e /packages/TtsService/src/android/tts/TtsService.java
parent5af53d4363342b383fd1e4439b5a2c71a47c593d (diff)
downloadframeworks_base-a19ac0f639e90781fb1755d5940867dfd55f4d5d.zip
frameworks_base-a19ac0f639e90781fb1755d5940867dfd55f4d5d.tar.gz
frameworks_base-a19ac0f639e90781fb1755d5940867dfd55f4d5d.tar.bz2
Removing logs of text that is being spoken.
Change-Id: I12624e51eb093b6ee464fc11275046a9e5100925
Diffstat (limited to 'packages/TtsService/src/android/tts/TtsService.java')
-rwxr-xr-xpackages/TtsService/src/android/tts/TtsService.java50
1 files changed, 25 insertions, 25 deletions
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 @@ public class TtsService extends Service implements OnCompletionListener {
* 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 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<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 @@ 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);
}
/**