Fix logic error in Pszczepaniak's recent change.

Also improve wording of error message.

Bug: 7666482
Change-Id: I2d2316b10fdf394bec8963327529723cbd5fbb32
This commit is contained in:
Fergus Henderson
2013-01-25 14:59:59 +00:00
parent 526603b1d8
commit 1c2df38242

View File

@@ -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);