diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/OmnipodModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/OmnipodModule.kt index c19443146f..ccb538dfbd 100644 --- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/OmnipodModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/OmnipodModule.kt @@ -25,4 +25,4 @@ abstract class OmnipodModule { @ContributesAndroidInjector abstract fun podSessionState(): PodSessionState -} \ No newline at end of file +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionState.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionState.java index 208a9a5051..64cb92e84b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionState.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodSessionState.java @@ -1,7 +1,6 @@ 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; @@ -34,42 +33,26 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP; public class PodSessionState extends PodState { - @Inject AAPSLogger aapsLogger; - @Inject SP sp; - @Inject OmnipodUtil omnipodUtil; + @Inject transient AAPSLogger aapsLogger; + @Inject transient SP sp; + @Inject transient OmnipodUtil omnipodUtil; - @Expose - private final Map 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 final Map configuredAlerts; private DateTimeZone timeZone; - @Expose + private DateTime activatedAt; + private DateTime expiresAt; + private final FirmwareVersion piVersion; + private final FirmwareVersion pmVersion; + private final int lot; + private final int tid; + private Double reservoirLevel; + private boolean suspended; 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, diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodState.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodState.java index 8f229f3ec2..c6987c879e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodState.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodState.java @@ -2,7 +2,6 @@ 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; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/util/OmnipodUtil.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/util/OmnipodUtil.java index 435c08c8a5..f002989e3c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/util/OmnipodUtil.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/util/OmnipodUtil.java @@ -142,7 +142,7 @@ public class OmnipodUtil { .registerTypeAdapter(DateTimeZone.class, (JsonDeserializer) (json, typeOfT, context) -> DateTimeZone.forID(json.getAsString())); - return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create(); + return gsonBuilder.create(); } @@ -201,7 +201,7 @@ public class OmnipodUtil { } public Integer getNextPodAddress() { - if(sp.contains(OmnipodConst.Prefs.NextPodAddress)) { + if (sp.contains(OmnipodConst.Prefs.NextPodAddress)) { int nextPodAddress = sp.getInt(OmnipodConst.Prefs.NextPodAddress, 0); if (OmnipodManager.isValidAddress(nextPodAddress)) { return nextPodAddress;