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

Commit 3f0363bb authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Deprecate setEngineByPackageName

This function does not let callers know when the TTS engine has
been initialized.

Change-Id: I17fcf3f95ad5bbdb9b787ba0846e6e63d424cd23
parent 70832a3d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17603,7 +17603,7 @@ package android.speech.tts {
    method public boolean isSpeaking();
    method public int playEarcon(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>);
    method public int playSilence(long, int, java.util.HashMap<java.lang.String, java.lang.String>);
    method public int setEngineByPackageName(java.lang.String);
    method public deprecated int setEngineByPackageName(java.lang.String);
    method public int setLanguage(java.util.Locale);
    method public int setOnUtteranceCompletedListener(android.speech.tts.TextToSpeech.OnUtteranceCompletedListener);
    method public int setPitch(float);
+5 −3
Original line number Diff line number Diff line
@@ -1052,13 +1052,15 @@ public class TextToSpeech {
    /**
     * Sets the TTS engine to use.
     *
     * @deprecated This doesn't inform callers when the TTS engine has been
     *        initialized. {@link #TextToSpeech(Context, OnInitListener, String)}
     *        can be used with the appropriate engine name.
     *
     * @param enginePackageName The package name for the synthesis engine (e.g. "com.svox.pico")
     *
     * @return {@link #ERROR} or {@link #SUCCESS}.
     */
    // TODO: add @Deprecated{This method does not tell the caller when the new engine
    // has been initialized. You should create a new TextToSpeech object with the new
    // engine instead.}
    @Deprecated
    public int setEngineByPackageName(String enginePackageName) {
        mRequestedEngine = enginePackageName;
        return initTts();