Browse Source

TtsService.java: use the context from the TtsService object itself

master
Reece H. Dunn 12 years ago
parent
commit
199029e97e
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      android/src/com/reecedunn/espeak/TtsService.java

+ 2
- 3
android/src/com/reecedunn/espeak/TtsService.java View File

@@ -114,10 +114,9 @@ public class TtsService extends TextToSpeechService {

@Override
protected int onIsLanguageAvailable(String language, String country, String variant) {
Context context = getApplicationContext();
if (!mEngineInitialized ||
!CheckVoiceData.hasBaseResources(context) ||
CheckVoiceData.canUpgradeResources(context)) {
!CheckVoiceData.hasBaseResources(this) ||
CheckVoiceData.canUpgradeResources(this)) {
return TextToSpeech.LANG_MISSING_DATA;
}


Loading…
Cancel
Save