am 949ea9f0: am 32190676: am 90ae2778: am 299bb1fb: Fix issues with new TTS API
* commit '949ea9f011ee3577a6a73c6181185bd01f041597': Fix issues with new TTS API
This commit is contained in:
committed by
Android Git Automerger
commit
c2ece0002b
@@ -27282,7 +27282,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<java.lang.String, java.lang.String>);
|
||||
method public int playSilence(long, int, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String);
|
||||
method public int playSilence(long, int, java.lang.String);
|
||||
method public deprecated int playSilence(long, int, java.util.HashMap<java.lang.String, java.lang.String>);
|
||||
method public int setAudioAttributes(android.media.AudioAttributes);
|
||||
method public deprecated int setEngineByPackageName(java.lang.String);
|
||||
@@ -27370,7 +27370,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<java.lang.String> onGetFeaturesForLanguage(java.lang.String, java.lang.String, java.lang.String);
|
||||
method protected abstract java.lang.String[] onGetLanguage();
|
||||
method public java.util.List<android.speech.tts.Voice> onGetVoices();
|
||||
@@ -27400,6 +27400,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
|
||||
|
||||
@@ -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 <b>queuing</b> the playSilence operation.
|
||||
*/
|
||||
public int playSilence(final long durationInMs, final int queueMode,
|
||||
final HashMap<String, String> params, final String utteranceId) {
|
||||
final String utteranceId) {
|
||||
return runAction(new Action<Integer>() {
|
||||
@Override
|
||||
public Integer run(ITextToSpeechService service) throws RemoteException {
|
||||
@@ -1258,12 +1253,12 @@ public class TextToSpeech {
|
||||
*
|
||||
* @return {@link #ERROR} or {@link #SUCCESS} of <b>queuing</b> 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<String, String> params) {
|
||||
return playSilence(durationInMs, queueMode, params,
|
||||
return playSilence(durationInMs, queueMode,
|
||||
params == null ? null : params.get(Engine.KEY_PARAM_UTTERANCE_ID));
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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<String>(mFeatures));
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final Parcelable.Creator<Voice> CREATOR = new Parcelable.Creator<Voice>() {
|
||||
@Override
|
||||
public Voice createFromParcel(Parcel in) {
|
||||
|
||||
Reference in New Issue
Block a user