diff options
Diffstat (limited to 'packages/TtsService/src/android/tts/TtsService.java')
| -rwxr-xr-x | packages/TtsService/src/android/tts/TtsService.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java index b50add6..e9c4ab7 100755 --- a/packages/TtsService/src/android/tts/TtsService.java +++ b/packages/TtsService/src/android/tts/TtsService.java @@ -15,9 +15,6 @@ */ package android.tts; -import android.speech.tts.ITts.Stub; -import android.speech.tts.ITtsCallback; - import android.app.Service; import android.content.ContentResolver; import android.content.Context; @@ -32,6 +29,9 @@ import android.os.IBinder; import android.os.RemoteCallbackList; import android.os.RemoteException; import android.preference.PreferenceManager; +import android.speech.tts.ITts.Stub; +import android.speech.tts.ITtsCallback; +import android.speech.tts.TextToSpeech; import android.util.Log; import java.util.ArrayList; import java.util.Arrays; @@ -93,10 +93,6 @@ public class TtsService extends Service implements OnCompletionListener { private static final String CATEGORY = "android.intent.category.TTS"; private static final String PKGNAME = "android.tts"; - private static final int FALLBACK_TTS_DEFAULT_RATE = 100; // 1x - private static final int FALLBACK_TTS_DEFAULT_PITCH = 100;// 1x - private static final int FALLBACK_TTS_USE_DEFAULTS = 0; - final RemoteCallbackList<android.speech.tts.ITtsCallback> mCallbacks = new RemoteCallbackList<ITtsCallback>(); private Boolean mIsSpeaking; @@ -162,14 +158,16 @@ public class TtsService extends Service implements OnCompletionListener { private boolean isDefaultEnforced() { return (android.provider.Settings.Secure.getInt(mResolver, - android.provider.Settings.Secure.TTS_USE_DEFAULTS, FALLBACK_TTS_USE_DEFAULTS) + android.provider.Settings.Secure.TTS_USE_DEFAULTS, + TextToSpeech.Engine.FALLBACK_TTS_USE_DEFAULTS) == 1 ); } private int getDefaultRate() { return android.provider.Settings.Secure.getInt(mResolver, - android.provider.Settings.Secure.TTS_DEFAULT_RATE, FALLBACK_TTS_DEFAULT_RATE); + android.provider.Settings.Secure.TTS_DEFAULT_RATE, + TextToSpeech.Engine.FALLBACK_TTS_DEFAULT_RATE); } |
