From cb978473927b71da7b2c3c266cebe71c80bf8e70 Mon Sep 17 00:00:00 2001 From: Rodrigo Damazio Date: Sun, 21 Nov 2010 00:44:34 -0800 Subject: [PATCH] Addressing comments from a475cd4d33. --- .../android/apps/mytracks/services/StatusAnnouncerTask.java | 3 ++- .../apps/mytracks/services/StatusAnnouncerTaskTest.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MyTracks/src/com/google/android/apps/mytracks/services/StatusAnnouncerTask.java b/MyTracks/src/com/google/android/apps/mytracks/services/StatusAnnouncerTask.java index 60154ba8e..8fe01eacb 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/services/StatusAnnouncerTask.java +++ b/MyTracks/src/com/google/android/apps/mytracks/services/StatusAnnouncerTask.java @@ -43,6 +43,7 @@ public class StatusAnnouncerTask implements PeriodicTask { /** * The rate at which announcements are spoken. */ + // @VisibleForTesting static final float TTS_SPEECH_RATE = 0.9f; /** @@ -99,7 +100,7 @@ public class StatusAnnouncerTask implements PeriodicTask { */ private void onTtsInit(int status) { Log.i(MyTracksConstants.TAG, "TrackRecordingService.TTS init: " + status); - this.ready = (status == TextToSpeech.SUCCESS); + this.ready = status == TextToSpeech.SUCCESS; if (ready) { // Force the language to be the same as the string we will be speaking, diff --git a/MyTracksTest/src/com/google/android/apps/mytracks/services/StatusAnnouncerTaskTest.java b/MyTracksTest/src/com/google/android/apps/mytracks/services/StatusAnnouncerTaskTest.java index 58e4748d9..59ef6853c 100644 --- a/MyTracksTest/src/com/google/android/apps/mytracks/services/StatusAnnouncerTaskTest.java +++ b/MyTracksTest/src/com/google/android/apps/mytracks/services/StatusAnnouncerTaskTest.java @@ -97,7 +97,7 @@ public class StatusAnnouncerTaskTest extends AndroidTestCase { * like this, but basically the issue is that TextToSpeech cannot be mocked * without running its constructor, its constructor runs async operations * which call other methods (and then if the methods are part of a mock we'd - * have to set a behaviour, but we can't 'cause the object hasn't been fully + * have to set a behavior, but we can't 'cause the object hasn't been fully * built yet). * The logic is that calls made during the constructor (when tts is not yet * set) will go up to the original class, but after tts is set we'll forward