- added Expose attribute to all varaiables in PodSessionState
- OmnipodUtil: Gson now uses only Expose fields
This commit is contained in:
parent
2de1761555
commit
e51e3daeb1
|
@ -55,9 +55,9 @@ public class OmnipodCommunicationManager extends RileyLinkCommunicationManager {
|
|||
|
||||
@Inject public AAPSLogger aapsLogger;
|
||||
@Inject OmnipodPumpStatus omnipodPumpStatus;
|
||||
@Inject OmnipodPumpPlugin omnipodPumpPlugin;
|
||||
@Inject RileyLinkServiceData rileyLinkServiceData;
|
||||
@Inject ServiceTaskExecutor serviceTaskExecutor;
|
||||
//@Inject OmnipodPumpPlugin omnipodPumpPlugin;
|
||||
//@Inject RileyLinkServiceData rileyLinkServiceData;
|
||||
//@Inject ServiceTaskExecutor serviceTaskExecutor;
|
||||
|
||||
public OmnipodCommunicationManager(HasAndroidInjector injector, RFSpy rfspy) {
|
||||
super(injector, rfspy);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.defs.state;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
|
@ -37,22 +38,38 @@ public class PodSessionState extends PodState {
|
|||
@Inject SP sp;
|
||||
@Inject OmnipodUtil omnipodUtil;
|
||||
|
||||
@Expose
|
||||
private final Map<AlertSlot, AlertType> configuredAlerts;
|
||||
@Expose
|
||||
private transient PodStateChangedHandler stateChangedHandler;
|
||||
@Expose
|
||||
private DateTime activatedAt;
|
||||
@Expose
|
||||
private DateTime expiresAt;
|
||||
@Expose
|
||||
private final FirmwareVersion piVersion;
|
||||
@Expose
|
||||
private final FirmwareVersion pmVersion;
|
||||
@Expose
|
||||
private final int lot;
|
||||
@Expose
|
||||
private final int tid;
|
||||
@Expose
|
||||
private Double reservoirLevel;
|
||||
@Expose
|
||||
private boolean suspended;
|
||||
|
||||
@Expose
|
||||
private DateTimeZone timeZone;
|
||||
@Expose
|
||||
private NonceState nonceState;
|
||||
@Expose
|
||||
private SetupProgress setupProgress;
|
||||
@Expose
|
||||
private AlertSet activeAlerts;
|
||||
@Expose
|
||||
private BasalSchedule basalSchedule;
|
||||
@Expose
|
||||
private DeliveryStatus lastDeliveryStatus;
|
||||
|
||||
public PodSessionState(DateTimeZone timeZone, int address, FirmwareVersion piVersion,
|
||||
|
|
|
@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.defs.state;
|
|||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.StatusResponse;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoFaultEvent;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil;
|
||||
|
||||
public abstract class PodState {
|
||||
protected final int address;
|
||||
|
|
|
@ -136,7 +136,7 @@ public class OmnipodUtil {
|
|||
.registerTypeAdapter(DateTimeZone.class, (JsonDeserializer<DateTimeZone>) (json, typeOfT, context) ->
|
||||
DateTimeZone.forID(json.getAsString()));
|
||||
|
||||
return gsonBuilder.create();
|
||||
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create();
|
||||
}
|
||||
|
||||
|
||||
|
@ -215,4 +215,12 @@ public class OmnipodUtil {
|
|||
public void removeNextPodAddress() {
|
||||
sp.remove(OmnipodConst.Prefs.NextPodAddress);
|
||||
}
|
||||
|
||||
public AAPSLogger getAapsLogger() {
|
||||
return this.aapsLogger;
|
||||
}
|
||||
|
||||
public SP getSp() {
|
||||
return this.sp;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue