From 633b7a5673d589043fd9bc7d55911431ee487cc5 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Mon, 12 Oct 2015 07:29:08 +0100 Subject: [PATCH] eSpeakActivity: revert a workaround for the Parcel error from the eSpeak activity --- android/src/com/reecedunn/espeak/eSpeakActivity.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/android/src/com/reecedunn/espeak/eSpeakActivity.java b/android/src/com/reecedunn/espeak/eSpeakActivity.java index ac63a0ae..66a2a3ab 100644 --- a/android/src/com/reecedunn/espeak/eSpeakActivity.java +++ b/android/src/com/reecedunn/espeak/eSpeakActivity.java @@ -198,14 +198,7 @@ public class eSpeakActivity extends Activity { private Locale getTtsLanguage() { if (mTts != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - android.speech.tts.Voice voice = null; - try { - voice = mTts.getVoice(); - } catch (NullPointerException e) { - // Android Lollipop and later may throw a NullPointerException - // if a voice is not selected. - return null; - } + android.speech.tts.Voice voice = mTts.getVoice(); if (voice != null) { return voice.getLocale(); }