From 1c2df38242c29cd7f359a6fb13dc13b387264310 Mon Sep 17 00:00:00 2001 From: Fergus Henderson Date: Fri, 25 Jan 2013 14:59:59 +0000 Subject: [PATCH] Fix logic error in Pszczepaniak's recent change. Also improve wording of error message. Bug: 7666482 Change-Id: I2d2316b10fdf394bec8963327529723cbd5fbb32 --- core/java/android/speech/tts/TextToSpeech.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index e2dc5d5ded81a..f52b5e30295b7 100644 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -1475,8 +1475,8 @@ public class TextToSpeech { Log.w(TAG, method + " failed: not connected to TTS engine"); return errorResult; } - if (onlyEstablishedConnection && isEstablished()) { - Log.w(TAG, method + " failed: TTS engine connection not fully setuped"); + if (onlyEstablishedConnection && !isEstablished()) { + Log.w(TAG, method + " failed: TTS engine connection not fully set up"); return errorResult; } return action.run(mService);