diff options
| -rw-r--r-- | main/src/cgeo/geocaching/speech/SpeechService.java | 5 |
1 files 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() { |
