mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 06:01:53 +00:00
eSpeakActivity: don't report an error if mVoices is null, set the installed voices to 0.
This commit is contained in:
@@ -151,17 +151,14 @@ public class eSpeakActivity extends Activity {
|
||||
|
||||
mVoices = data.getStringArrayListExtra(TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES);
|
||||
|
||||
if (mVoices == null) {
|
||||
Log.e(TAG, "Data check failed -- voices is null.");
|
||||
setState(State.FAILURE);
|
||||
showDialog(DIALOG_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
initializeEngine();
|
||||
|
||||
final TextView availableVoices = (TextView) findViewById(R.id.availableVoices);
|
||||
availableVoices.setText(Integer.toString(mVoices.size()));
|
||||
if (mVoices == null) {
|
||||
availableVoices.setText("0");
|
||||
} else {
|
||||
availableVoices.setText(Integer.toString(mVoices.size()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user