summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2014-09-22 17:39:16 +0100
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>2014-09-22 17:39:16 +0100
commitf9ba548f210b0ed071ff7d597ddf2209af817294 (patch)
tree1ee0bfbae10a4c31a535fc47a4472dc43a7430ca /core/java/android/speech
parentfdb35f0526e63dc4d6882d86029d9beacc6a2d07 (diff)
downloadframeworks_base-f9ba548f210b0ed071ff7d597ddf2209af817294.zip
frameworks_base-f9ba548f210b0ed071ff7d597ddf2209af817294.tar.gz
frameworks_base-f9ba548f210b0ed071ff7d597ddf2209af817294.tar.bz2
Fix issues with new TTS API
Bug: 17389935 Change-Id: I59234b3222f59dc89be7e40f7d4706b1f8c610ce
Diffstat (limited to 'core/java/android/speech')
-rw-r--r--core/java/android/speech/tts/TextToSpeech.java11
-rw-r--r--core/java/android/speech/tts/TextToSpeechService.java2
-rw-r--r--core/java/android/speech/tts/Voice.java9
3 files changed, 4 insertions, 18 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 9be220e..120c9e3 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 <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));
}
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java
index d00a433..079467a 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 a1fa51d..dcf5980 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<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) {