From 20d32d042fdc53e85bc34c47ff333e571e1ab0cc Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Tue, 7 Feb 2017 12:08:13 +0100 Subject: [PATCH] wear bolusprogress cleanup --- .../info/nightscout/androidaps/plugins/Wear/WearPlugin.java | 4 ---- .../main/java/info/nightscout/androidaps/ListenerService.java | 3 --- 2 files changed, 7 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java index 3d01bafb16..c941851234 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java @@ -155,15 +155,11 @@ public class WearPlugin implements PluginBase { @Subscribe public void onStatusEvent(final EventBolusRequested ev) { - ToastUtils.showToastInUiThread(ctx, "EventBolusRequested !!!"); String status = String.format(MainApp.sResources.getString(R.string.bolusrequested), ev.getAmount()); - Intent intent = new Intent(ctx, WatchUpdaterService.class).setAction(WatchUpdaterService.ACTION_SEND_BOLUSPROGRESS); intent.putExtra("progresspercent", 0); intent.putExtra("progressstatus", status); - ToastUtils.showToastInUiThread(ctx, "before startService"); ctx.startService(intent); - ToastUtils.showToastInUiThread(ctx, "after startService"); } diff --git a/wear/src/main/java/info/nightscout/androidaps/ListenerService.java b/wear/src/main/java/info/nightscout/androidaps/ListenerService.java index a2b3646f1c..c13c75f69c 100644 --- a/wear/src/main/java/info/nightscout/androidaps/ListenerService.java +++ b/wear/src/main/java/info/nightscout/androidaps/ListenerService.java @@ -132,7 +132,6 @@ public class ListenerService extends WearableListenerService implements GoogleAp googleApiConnect(); cancelBolus(); } - //TODO: add action to cancel bolus return START_STICKY; } @@ -202,11 +201,9 @@ public class ListenerService extends WearableListenerService implements GoogleAp .setVibrate(vibratePattern) .addAction(R.drawable.ic_cancel, "CANCEL BOLUS", cancelPendingIntent); - // Get an instance of the NotificationManager service NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); - // Build the notification and issues it with notification manager. notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build()); if (progresspercent == 100){