Small Dagger improvements
This commit is contained in:
parent
963f0ca851
commit
e39c222203
|
@ -74,8 +74,8 @@ public class MedtronicCommunicationManager extends RileyLinkCommunicationManager
|
|||
private boolean doWakeUpBeforeCommand = true;
|
||||
|
||||
|
||||
public MedtronicCommunicationManager(HasAndroidInjector injector, RFSpy rfspy) {
|
||||
super(injector, rfspy);
|
||||
public MedtronicCommunicationManager(HasAndroidInjector injector) {
|
||||
super(injector);
|
||||
medtronicPumpStatus.previousConnection = sp.getLong(
|
||||
RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ public class RileyLinkMedtronicService extends RileyLinkService {
|
|||
rfspy.startReader();
|
||||
|
||||
// init rileyLinkCommunicationManager
|
||||
medtronicCommunicationManager = new MedtronicCommunicationManager(injector, rfspy);
|
||||
medtronicCommunicationManager = new MedtronicCommunicationManager(injector);
|
||||
medtronicUIComm = new MedtronicUIComm(injector, aapsLogger, medtronicUtil, medtronicUIPostprocessor, medtronicCommunicationManager);
|
||||
|
||||
aapsLogger.debug(LTag.PUMPCOMM, "RileyLinkMedtronicService newly constructed");
|
||||
|
|
|
@ -53,15 +53,11 @@ import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodConst;
|
|||
// TODO make singleton and rename to OmnipodRileyLinkCommunicationManager
|
||||
public class OmnipodCommunicationManager extends RileyLinkCommunicationManager {
|
||||
|
||||
@Inject public AAPSLogger aapsLogger;
|
||||
@Inject OmnipodPumpStatus omnipodPumpStatus;
|
||||
//@Inject OmnipodPumpPlugin omnipodPumpPlugin;
|
||||
//@Inject RileyLinkServiceData rileyLinkServiceData;
|
||||
//@Inject ServiceTaskExecutor serviceTaskExecutor;
|
||||
|
||||
@Inject
|
||||
public OmnipodCommunicationManager(HasAndroidInjector injector, RFSpy rfspy) {
|
||||
super(injector, rfspy);
|
||||
public OmnipodCommunicationManager(HasAndroidInjector injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -35,26 +35,24 @@ public abstract class RileyLinkCommunicationManager {
|
|||
@Inject protected SP sp;
|
||||
@Inject protected RileyLinkServiceData rileyLinkServiceData;
|
||||
@Inject protected ServiceTaskExecutor serviceTaskExecutor;
|
||||
|
||||
@Inject protected RFSpy rfspy;
|
||||
|
||||
private final int SCAN_TIMEOUT = 1500;
|
||||
private final int ALLOWED_PUMP_UNREACHABLE = 10 * 60 * 1000; // 10 minutes
|
||||
|
||||
public final HasAndroidInjector injector;
|
||||
protected final RFSpy rfspy;
|
||||
|
||||
protected int receiverDeviceAwakeForMinutes = 1; // override this in constructor of specific implementation
|
||||
protected String receiverDeviceID; // String representation of receiver device (ex. Pump (xxxxxx) or Pod (yyyyyy))
|
||||
protected long lastGoodReceiverCommunicationTime = 0;
|
||||
// protected PumpStatus pumpStatus;
|
||||
private long nextWakeUpRequired = 0L;
|
||||
|
||||
private int timeoutCount = 0;
|
||||
|
||||
|
||||
public RileyLinkCommunicationManager(HasAndroidInjector injector, RFSpy rfspy) {
|
||||
public RileyLinkCommunicationManager(HasAndroidInjector injector) {
|
||||
this.injector = injector;
|
||||
this.injector.androidInjector().inject(this);
|
||||
this.rfspy = rfspy;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue