From 79d0d7cc4c820f29e13fa24bcdf3b16df50852ea Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Mon, 8 Oct 2018 05:19:52 +0200 Subject: [PATCH] Fix notification not being cancelled on app shutdown (#81) Fix notification not being cancelled on app shutdown if the app was continously in DISABLED state. --- .../nutomic/syncthingandroid/service/NotificationHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java b/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java index 32db4f77..29b75e43 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java @@ -171,6 +171,8 @@ public class NotificationHandler { Log.v(TAG, "Updating notification"); mNotificationManager.notify(idToShow, builder.build()); } + } else { + mNotificationManager.cancel(idToShow); } mNotificationManager.cancel(idToCancel);