summaryrefslogtreecommitdiff
path: root/pico
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2013-03-26 06:11:53 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-26 06:11:53 -0700
commit0502a12f926e2737e508376d5fad2e72314144ad (patch)
treefd699bd088ae6f070b19d8c4c96f436d36ca7971 /pico
parent34e0c3e3271a8a068f4cd2c598ad9cbd75c3606b (diff)
parent3a3143335fffff727e1b5596a5992a3705dfc065 (diff)
downloadsvox-0502a12f926e2737e508376d5fad2e72314144ad.tar.gz
am 3a314333: Merge "PicoTTS: Set mNativeSynth prior to TextToSpeechService#onCreate"
* commit '3a3143335fffff727e1b5596a5992a3705dfc065': PicoTTS: Set mNativeSynth prior to TextToSpeechService#onCreate
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