Fix showing list of languages for picoTTS

PicoTTS have a tendency to return a
CHECK_VOICE_DATA_MISSING_DATA for its CHECK_TTS_DATA
activity. This blanks the language selection preference.
The fix is to show languages selection for all
results of CHECK_TTS_DATA that are not a total failure
(TextToSpeech.Engine.CHECK_VOICE_DATA_FAIL).

Change-Id: I984d7cc9b0dc830ad2b8195a820f9b6fc4ddf1e0
(cherry picked from commit e0d519f3cf)
This commit is contained in:
Przemyslaw Szczepaniak
2014-07-21 16:27:00 +01:00
parent d7bdf17aba
commit c0bffe7148

View File

@@ -190,7 +190,7 @@ public class TtsEngineSettingsFragment extends SettingsPreferenceFragment implem
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == VOICE_DATA_INTEGRITY_CHECK) {
if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {
if (resultCode != TextToSpeech.Engine.CHECK_VOICE_DATA_FAIL) {
updateVoiceDetails(data);
} else {
Log.e(TAG, "CheckVoiceData activity failed");