From 2f61949198d86b132f71a9dde8726e96251cbd78 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Sun, 17 Aug 2014 19:38:05 +0200 Subject: fix: wrong toast on finishing compass --- main/src/cgeo/geocaching/speech/SpeechService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/src/cgeo/geocaching/speech/SpeechService.java b/main/src/cgeo/geocaching/speech/SpeechService.java index d5f5865..fbd2d7e 100644 --- a/main/src/cgeo/geocaching/speech/SpeechService.java +++ b/main/src/cgeo/geocaching/speech/SpeechService.java @@ -174,8 +174,9 @@ public class SpeechService extends Service implements OnInitListener { public static void stopService(final Activity activity) { isRunning = false; - activity.stopService(new Intent(activity, SpeechService.class)); - ActivityMixin.showShortToast(activity, activity.getResources().getString(R.string.tts_stopped)); + if (activity.stopService(new Intent(activity, SpeechService.class))) { + ActivityMixin.showShortToast(activity, activity.getResources().getString(R.string.tts_stopped)); + } } public static boolean isRunning() { -- cgit v1.1