From ee06d1119d19439237ae078be779dbb73a5547c1 Mon Sep 17 00:00:00 2001 From: Sebastian Lenz Date: Thu, 26 Jul 2018 13:07:08 +0200 Subject: [PATCH] clear Notification if tbr is accepted from wearable --- .../androidaps/plugins/Wear/ActionStringHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java index 0e21ec5fc2..00b1d7e646 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java @@ -1,5 +1,7 @@ package info.nightscout.androidaps.plugins.Wear; +import android.app.NotificationManager; +import android.content.Context; import android.os.HandlerThread; import android.support.annotation.NonNull; @@ -644,6 +646,9 @@ public class ActionStringHandler { MainApp.bus().post(new EventDismissNotification(SafeParse.stringToInt(act[1]))); } else if ("changeRequest".equals(act[0])) { LoopPlugin.getPlugin().acceptChangeRequest(); + NotificationManager notificationManager = + (NotificationManager) MainApp.instance().getSystemService(Context.NOTIFICATION_SERVICE); + notificationManager.cancel(Constants.notificationID); } lastBolusWizard = null; }