clear Notification if tbr is accepted from wearable

This commit is contained in:
Sebastian Lenz 2018-07-26 13:07:08 +02:00
parent 79abcdb0d7
commit ee06d1119d

View file

@ -1,5 +1,7 @@
package info.nightscout.androidaps.plugins.Wear; package info.nightscout.androidaps.plugins.Wear;
import android.app.NotificationManager;
import android.content.Context;
import android.os.HandlerThread; import android.os.HandlerThread;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
@ -644,6 +646,9 @@ public class ActionStringHandler {
MainApp.bus().post(new EventDismissNotification(SafeParse.stringToInt(act[1]))); MainApp.bus().post(new EventDismissNotification(SafeParse.stringToInt(act[1])));
} else if ("changeRequest".equals(act[0])) { } else if ("changeRequest".equals(act[0])) {
LoopPlugin.getPlugin().acceptChangeRequest(); LoopPlugin.getPlugin().acceptChangeRequest();
NotificationManager notificationManager =
(NotificationManager) MainApp.instance().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(Constants.notificationID);
} }
lastBolusWizard = null; lastBolusWizard = null;
} }