diff options
author | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2013-11-22 13:08:01 +0000 |
---|---|---|
committer | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2014-01-30 13:27:00 +0000 |
commit | 8399aae0a0532863752e593050e8810d03737936 (patch) | |
tree | 11296a01b7b291c21d3ee16e65405a99b9d1766d /core/java/android/speech | |
parent | 1ca1d886588ce54ab0c0229eabc49fa8dff40bc5 (diff) | |
download | frameworks_base-8399aae0a0532863752e593050e8810d03737936.zip frameworks_base-8399aae0a0532863752e593050e8810d03737936.tar.gz frameworks_base-8399aae0a0532863752e593050e8810d03737936.tar.bz2 |
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
Diffstat (limited to 'core/java/android/speech')
-rw-r--r-- | core/java/android/speech/tts/SynthesisRequestV2.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/speech/tts/SynthesisRequestV2.java b/core/java/android/speech/tts/SynthesisRequestV2.java index ed268b7..a1da49c 100644 --- a/core/java/android/speech/tts/SynthesisRequestV2.java +++ b/core/java/android/speech/tts/SynthesisRequestV2.java @@ -32,6 +32,18 @@ public final class SynthesisRequestV2 implements Parcelable { 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. * * @hide |