aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-08-17 19:38:05 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-08-17 19:38:05 +0200
commit2f61949198d86b132f71a9dde8726e96251cbd78 (patch)
tree349b00c15f47359aacc52d362237e85c1a1f7c1f
parent591ff70b45195c03bb78de7c8a07a320754f72ca (diff)
downloadcgeo-2f61949198d86b132f71a9dde8726e96251cbd78.zip
cgeo-2f61949198d86b132f71a9dde8726e96251cbd78.tar.gz
cgeo-2f61949198d86b132f71a9dde8726e96251cbd78.tar.bz2
fix: wrong toast on finishing compass
-rw-r--r--main/src/cgeo/geocaching/speech/SpeechService.java5
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() {