Commit 6de4678d authored by akwizgran's avatar akwizgran

Cancel alarm and interrupt network thread when stopping service.

parent f055eb9a
......@@ -95,6 +95,8 @@ public class SnoozeService extends Service {
public void onDestroy() {
super.onDestroy();
log.log("Service destroyed");
if (alarm != null) alarm.cancelAlarm();
if (networkClient != null) networkClient.interrupt();
if (foreground) stopForegroundService();
unregisterReceiver(receiver);
if (wakeLock != null) releaseWakeLock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment