diff --git a/api/current.txt b/api/current.txt index 90d63b02f22cb..2cd1708727be0 100644 --- a/api/current.txt +++ b/api/current.txt @@ -27278,7 +27278,7 @@ package android.speech.tts { method public boolean isSpeaking(); method public int playEarcon(java.lang.String, int, android.os.Bundle, java.lang.String); method public deprecated int playEarcon(java.lang.String, int, java.util.HashMap); - method public int playSilence(long, int, java.util.HashMap, java.lang.String); + method public int playSilence(long, int, java.lang.String); method public deprecated int playSilence(long, int, java.util.HashMap); method public int setAudioAttributes(android.media.AudioAttributes); method public deprecated int setEngineByPackageName(java.lang.String); @@ -27366,7 +27366,7 @@ package android.speech.tts { public abstract class TextToSpeechService extends android.app.Service { ctor public TextToSpeechService(); method public android.os.IBinder onBind(android.content.Intent); - method protected java.lang.String onGetDefaultVoiceNameFor(java.lang.String, java.lang.String, java.lang.String); + method public java.lang.String onGetDefaultVoiceNameFor(java.lang.String, java.lang.String, java.lang.String); method protected java.util.Set onGetFeaturesForLanguage(java.lang.String, java.lang.String, java.lang.String); method protected abstract java.lang.String[] onGetLanguage(); method public java.util.List onGetVoices(); @@ -27396,6 +27396,7 @@ package android.speech.tts { method public int getQuality(); method public boolean isNetworkConnectionRequired(); method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator CREATOR; field public static final int LATENCY_HIGH = 400; // 0x190 field public static final int LATENCY_LOW = 200; // 0xc8 field public static final int LATENCY_NORMAL = 300; // 0x12c diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index 9be220e896184..120c9e37b7925 100644 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -1216,17 +1216,12 @@ public class TextToSpeech { * * @param durationInMs The duration of the silence. * @param queueMode {@link #QUEUE_ADD} or {@link #QUEUE_FLUSH}. - * @param params Parameters for the request. Can be null. - * Engine specific parameters may be passed in but the parameter keys - * must be prefixed by the name of the engine they are intended for. For example - * the keys "com.svox.pico_foo" and "com.svox.pico:bar" will be passed to the - * engine named "com.svox.pico" if it is being used. * @param utteranceId An unique identifier for this request. * * @return {@link #ERROR} or {@link #SUCCESS} of queuing the playSilence operation. */ public int playSilence(final long durationInMs, final int queueMode, - final HashMap params, final String utteranceId) { + final String utteranceId) { return runAction(new Action() { @Override public Integer run(ITextToSpeechService service) throws RemoteException { @@ -1258,12 +1253,12 @@ public class TextToSpeech { * * @return {@link #ERROR} or {@link #SUCCESS} of queuing the playSilence operation. * @deprecated As of API level 20, replaced by - * {@link #playSilence(long, int, HashMap, String)}. + * {@link #playSilence(long, int, String)}. */ @Deprecated public int playSilence(final long durationInMs, final int queueMode, final HashMap params) { - return playSilence(durationInMs, queueMode, params, + return playSilence(durationInMs, queueMode, params == null ? null : params.get(Engine.KEY_PARAM_UTTERANCE_ID)); } diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java index d00a433ac65f6..079467a9e5299 100644 --- a/core/java/android/speech/tts/TextToSpeechService.java +++ b/core/java/android/speech/tts/TextToSpeechService.java @@ -317,7 +317,7 @@ public abstract class TextToSpeechService extends Service { * @return A name of the default voice for a given locale. */ - protected String onGetDefaultVoiceNameFor(String lang, String country, String variant) { + public String onGetDefaultVoiceNameFor(String lang, String country, String variant) { int localeStatus = onIsLanguageAvailable(lang, country, variant); Locale iso3Locale = null; switch (localeStatus) { diff --git a/core/java/android/speech/tts/Voice.java b/core/java/android/speech/tts/Voice.java index a1fa51d1901ed..dcf598014fdb5 100644 --- a/core/java/android/speech/tts/Voice.java +++ b/core/java/android/speech/tts/Voice.java @@ -91,9 +91,6 @@ public class Voice implements Parcelable { Collections.addAll(this.mFeatures, in.readStringArray()); } - /** - * @hide - */ @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(mName); @@ -104,17 +101,11 @@ public class Voice implements Parcelable { dest.writeStringList(new ArrayList(mFeatures)); } - /** - * @hide - */ @Override public int describeContents() { return 0; } - /** - * @hide - */ public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { @Override public Voice createFromParcel(Parcel in) {