Apply @andyrozman's fixes for compilation errors

This commit is contained in:
Bart Sopers 2020-05-04 23:06:15 +02:00
parent 71d5409344
commit df2de82810
2 changed files with 21 additions and 24 deletions

View file

@ -21,6 +21,7 @@ import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDriverState;
@ -46,7 +47,7 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodPumpPluginInterface {
// TODO Dagger
private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
//private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
protected static OmnipodDashPumpPlugin plugin = null;
//private RileyLinkOmnipodService omnipodService;
@ -66,7 +67,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
private Profile currentProfile;
@Inject
//@Inject
public OmnipodDashPumpPlugin(HasAndroidInjector injector,
AAPSLogger aapsLogger,
RxBusWrapper rxBus,
@ -104,13 +105,13 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
//
// public void onServiceDisconnected(ComponentName name) {
// if (isLoggingEnabled())
// LOG.debug("RileyLinkOmnipodService is disconnected");
// aapsLogger.debug(LTag.PUMP, "RileyLinkOmnipodService is disconnected");
// omnipodService = null;
// }
//
// public void onServiceConnected(ComponentName name, IBinder service) {
// if (isLoggingEnabled())
// LOG.debug("RileyLinkOmnipodService is connected");
// aapsLogger.debug(LTag.PUMP, "RileyLinkOmnipodService is connected");
// RileyLinkOmnipodService.LocalBinder mLocalBinder = (RileyLinkOmnipodService.LocalBinder) service;
// omnipodService = mLocalBinder.getServiceInstance();
//
@ -121,7 +122,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
//
// if (OmnipodUtil.getPumpStatus() != null) {
// if (isLoggingEnabled())
// LOG.debug("Starting OmniPod-RileyLink service");
// aapsLogger.debug(LTag.PUMP, "Starting OmniPod-RileyLink service");
// if (OmnipodUtil.getPumpStatus().setNotInPreInit()) {
// break;
// }
@ -171,7 +172,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
@Override
public boolean isInitialized() {
if (displayConnectionMessages)
LOG.debug(getLogPrefix() + "isInitialized");
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isInitialized");
return isServiceSet() && isInitialized;
}
@ -179,7 +180,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
@Override
public boolean isConnected() {
if (displayConnectionMessages)
LOG.debug(getLogPrefix() + "isConnected");
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isConnected");
return isServiceSet() && isServiceInitialized();
}
@ -187,7 +188,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
@Override
public boolean isConnecting() {
if (displayConnectionMessages)
LOG.debug(getLogPrefix() + "isConnecting");
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isConnecting");
return !isServiceSet() || !isServiceInitialized();
}
@ -224,7 +225,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
private void initializePump(boolean realInit) {
LOG.info(getLogPrefix() + "initializePump - start");
aapsLogger.info(LTag.PUMP, getLogPrefix() + "initializePump - start");
if (omnipodCommunicationManager == null) {
omnipodCommunicationManager = OmnipodDashCommunicationManager.getInstance();

View file

@ -2,13 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod_dash.comm;
import android.content.Context;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoRecentPulseLog;
@ -26,7 +22,7 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
// TODO Dagger
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
// private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
private static OmnipodDashCommunicationManager omnipodCommunicationManager;
private String errorMessage;
@ -38,51 +34,48 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
// RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L);
}
private PodSessionState getPodSessionState() {
return null;
}
public static OmnipodDashCommunicationManager getInstance() {
return omnipodCommunicationManager;
}
//@Override
protected void configurePumpSpecificSettings() {
//pumpStatus = OmnipodUtil.getPumpStatus();
}
public String getErrorResponse() {
return this.errorMessage;
}
private boolean isLogEnabled() {
return L.isEnabled(L.PUMPCOMM);
}
// private boolean isLogEnabled() {
// return L.isEnabled(L.PUMPCOMM);
// }
@Override
public PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver, Profile profile) {
return null;
}
@Override
public PumpEnactResult getPodStatus() {
return null;
}
@Override
public PumpEnactResult deactivatePod(PodInitReceiver podInitReceiver) {
return null;
}
@Override
public PumpEnactResult setBasalProfile(Profile profile) {
return null;
}
@Override
public PumpEnactResult resetPodStatus() {
return null;
}
@ -96,14 +89,17 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
return null;
}
@Override
public PumpEnactResult cancelBolus() {
return null;
}
@Override
public PumpEnactResult setTemporaryBasal(TempBasalPair tbr) {
return null;
}
@Override
public PumpEnactResult cancelTemporaryBasal() {
return null;
}