From 666ce54b1fb1c6dfb9eaf9519222d34067e84f9b Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 12 May 2020 15:07:50 +0200 Subject: [PATCH] lint & deprecation --- .../plugins/pump/omnipod/OmnipodPumpPlugin.java | 12 ------------ .../omnipod/defs/OmnipodPumpPluginInterface.java | 1 + .../pump/omnipod_dash/OmnipodDashPumpPlugin.java | 9 --------- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java index 8d5c7b8b41..76d39f7318 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java @@ -90,8 +90,6 @@ import io.reactivex.schedulers.Schedulers; public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPumpPluginInterface, RileyLinkPumpDevice { // TODO Dagger (maybe done) - private static OmnipodPumpPlugin plugin = null; - private RileyLinkServiceData rileyLinkServiceData; private ServiceTaskExecutor serviceTaskExecutor; private RileyLinkOmnipodService rileyLinkOmnipodService; private OmnipodUtil omnipodUtil; @@ -150,11 +148,9 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump PumpType.Insulet_Omnipod, injector, resourceHelper, aapsLogger, commandQueue, rxBus, activePlugin, sp, context, fabricPrivacy, dateUtil ); - this.rileyLinkServiceData = rileyLinkServiceData; this.serviceTaskExecutor = serviceTaskExecutor; displayConnectionMessages = false; - OmnipodPumpPlugin.plugin = this; this.omnipodUtil = omnipodUtil; this.omnipodPumpStatus = omnipodPumpStatus; @@ -249,14 +245,6 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump } - @Deprecated - public static OmnipodPumpPlugin getPlugin() { - if (plugin == null) - throw new IllegalStateException("Plugin not injected jet"); - return plugin; - } - - @Override protected void onStart() { super.onStart(); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodPumpPluginInterface.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodPumpPluginInterface.java index f2066ebb2b..0026d41f97 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodPumpPluginInterface.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodPumpPluginInterface.java @@ -10,6 +10,7 @@ public interface OmnipodPumpPluginInterface extends PumpInterface { void setDriverState(OmnipodDriverState state); + @Deprecated RxBusWrapper getRxBus(); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod_dash/OmnipodDashPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod_dash/OmnipodDashPumpPlugin.java index d4f8e8dc85..29e21e41ab 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod_dash/OmnipodDashPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod_dash/OmnipodDashPumpPlugin.java @@ -50,7 +50,6 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP // TODO Dagger //private static final Logger LOG = LoggerFactory.getLogger(L.PUMP); - protected static OmnipodDashPumpPlugin plugin = null; //private RileyLinkOmnipodService omnipodService; //private OmnipodPumpStatus pumpStatusLocal = null; @@ -136,14 +135,6 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP // }; } - @Deprecated - public static OmnipodDashPumpPlugin getPlugin() { - if (plugin == null) - throw new IllegalStateException("Plugin not injected jet"); - return plugin; - } - - private String getLogPrefix() { return "OmnipodPlugin::"; }