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

This commit is contained in:
Reece H. Dunn
2013-02-11 19:03:53 +00:00
parent 9d0a23bb1c
commit 199029e97e
@@ -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;
}