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

Commit 8399aae0 authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak
Browse files

Add public SynthesisRequestV2 constructor.

While implementing the new TTS API, I found out that it's very difficult
to create an SynthesisRequestV2 instance for testing purposes - it's
a final class, with no publicly visible constructors.

Bug: 8259486
Change-Id: I88b84fd8ad1ac6960f3932863ca758657f9547ff
parent 1ca1d886
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -23798,6 +23798,7 @@ package android.speech.tts {
  }
  }
  public final class SynthesisRequestV2 implements android.os.Parcelable {
  public final class SynthesisRequestV2 implements android.os.Parcelable {
    ctor public SynthesisRequestV2(java.lang.String, java.lang.String, java.lang.String, android.os.Bundle, android.os.Bundle);
    method public int describeContents();
    method public int describeContents();
    method public android.os.Bundle getAudioParams();
    method public android.os.Bundle getAudioParams();
    method public java.lang.String getText();
    method public java.lang.String getText();
+12 −0
Original line number Original line Diff line number Diff line
@@ -31,6 +31,18 @@ public final class SynthesisRequestV2 implements Parcelable {
    /** Audio Parameters. */
    /** Audio Parameters. */
    private final Bundle mAudioParams;
    private final Bundle mAudioParams;


    /**
     * Constructor for test purposes.
     */
    public SynthesisRequestV2(String text, String utteranceId, String voiceName,
            Bundle voiceParams, Bundle audioParams) {
        this.mText = text;
        this.mUtteranceId = utteranceId;
        this.mVoiceName = voiceName;
        this.mVoiceParams = voiceParams;
        this.mAudioParams = audioParams;
    }

    /**
    /**
     * Parcel based constructor.
     * Parcel based constructor.
     *
     *