diff options
| author | Rakesh Iyer <rni@google.com> | 2018-11-21 14:16:39 -0800 |
|---|---|---|
| committer | Rakesh Iyer <rni@google.com> | 2018-11-26 09:38:04 -0800 |
| commit | 241c46cdad2f32bf63af780f7614df7731754b8b (patch) | |
| tree | daa62e91dd81baa2401810de1f33d8e14efd5857 /core/java/android | |
| parent | b4182fb082693fb1489473ee1959d00e2be6dea8 (diff) | |
Fix off by one error in getMaxSpeechInputLength().
Bug: 115599815
Test: atest android.speech.tts.cts.TextToSpeechServiceTest
Change-Id: I43b9488bfee261cb2cefd63384739f493d32e2c4
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/speech/tts/TextToSpeechService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java index 85506e65931a..7815864ddfe9 100644 --- a/core/java/android/speech/tts/TextToSpeechService.java +++ b/core/java/android/speech/tts/TextToSpeechService.java @@ -1009,7 +1009,7 @@ public abstract class TextToSpeechService extends Service { Log.e(TAG, "null synthesis text"); return false; } - if (mText.length() >= TextToSpeech.getMaxSpeechInputLength()) { + if (mText.length() > TextToSpeech.getMaxSpeechInputLength()) { Log.w(TAG, "Text too long: " + mText.length() + " chars"); return false; } |
