Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 241c46cd authored by Rakesh Iyer's avatar Rakesh Iyer
Browse files

Fix off by one error in getMaxSpeechInputLength().

Bug: 115599815
Test: atest android.speech.tts.cts.TextToSpeechServiceTest
Change-Id: I43b9488bfee261cb2cefd63384739f493d32e2c4
parent b4182fb0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1009,7 +1009,7 @@ public abstract class TextToSpeechService extends Service {
                Log.e(TAG, "null synthesis text");
                Log.e(TAG, "null synthesis text");
                return false;
                return false;
            }
            }
            if (mText.length() >= TextToSpeech.getMaxSpeechInputLength()) {
            if (mText.length() > TextToSpeech.getMaxSpeechInputLength()) {
                Log.w(TAG, "Text too long: " + mText.length() + " chars");
                Log.w(TAG, "Text too long: " + mText.length() + " chars");
                return false;
                return false;
            }
            }