summaryrefslogtreecommitdiffstats
path: root/pico
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2012-12-21 23:33:12 +0100
committerJorge Ruesga <jorge@ruesga.com>2012-12-21 23:33:12 +0100
commit17e32ee53693b4d1044b1ab443caa8bffa67fe21 (patch)
tree4ae7879f5e751a424e1006a454b95cbbebd3a004 /pico
parent0256c986f7ff678bee07ca0462505e1de18efa62 (diff)
downloadexternal_svox-17e32ee53693b4d1044b1ab443caa8bffa67fe21.zip
external_svox-17e32ee53693b4d1044b1ab443caa8bffa67fe21.tar.gz
external_svox-17e32ee53693b4d1044b1ab443caa8bffa67fe21.tar.bz2
PicoTTS: Set mNativeSynth prior to TextToSpeechService#onCreateHEADreplicant-4.2-0004replicant-4.2
The variable mNativeSynth is used by TextToSpeechService#onCreate so it must be set prior to that call. Otherwise, the method TextToSpeech#onIsLanguageAvailable will return TextToSpeech.ERROR because the synthesizer is not ready. AOSP Change: https://android-review.googlesource.com/#/c/42781 Change-Id: I86fbfa7d928e5206b8fe88ec209f6a54fee4ffa0
Diffstat (limited to 'pico')
-rwxr-xr-xpico/compat/src/com/android/tts/compat/CompatTtsService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/pico/compat/src/com/android/tts/compat/CompatTtsService.java b/pico/compat/src/com/android/tts/compat/CompatTtsService.java
index 475afaf..dde706b 100755
--- a/pico/compat/src/com/android/tts/compat/CompatTtsService.java
+++ b/pico/compat/src/com/android/tts/compat/CompatTtsService.java
@@ -37,7 +37,6 @@ public abstract class CompatTtsService extends TextToSpeechService {
@Override
public void onCreate() {
if (DBG) Log.d(TAG, "onCreate()");
- super.onCreate();
String soFilename = getSoFilename();
@@ -71,6 +70,13 @@ public abstract class CompatTtsService extends TextToSpeechService {
c.close();
}
mNativeSynth = new SynthProxy(soFilename, engineConfig);
+
+ // mNativeSynth is used by TextToSpeechService#onCreate so it must be set prior
+ // to that call.
+ // getContentResolver() is also moved prior to super.onCreate(), and it works
+ // because the super method don't sets a field or value that affects getContentResolver();
+ // (including the content resolver itself).
+ super.onCreate();
}
@Override