Small cleanup

This commit is contained in:
Bart Sopers 2020-11-13 14:50:03 +01:00
parent 824b89adca
commit c9aa8b8bba
2 changed files with 2 additions and 21 deletions

View file

@ -18,13 +18,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro' consumerProguardFiles 'consumer-rules.pro'
// OMNIPOD: for usage in Firebase event during testing phase
buildConfigField "String", "VERSION", '"2.7-omnipod-0.4.1-SNAPSHOT"'
// OMNIPOD: Keep track of what commit from the main repository we're on, these fields aren't actually used anywhere
buildConfigField "String", "DEV_VERSION", '"2.7.0-rc4"'
buildConfigField "String", "DEV_VERSION_COMMIT", '"7d5dc54656c961660451c4fa4c6ea66bd83a1c46"'
buildConfigField "String", "DEV_VERSION_COMMIT_DATE", '"21.8.2020"' // 21st of August
} }
kotlinOptions { kotlinOptions {

View file

@ -4,7 +4,6 @@ import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.ServiceConnection; import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.IBinder; import android.os.IBinder;
import android.os.Looper; import android.os.Looper;
@ -77,7 +76,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mess
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.ActivationProgress; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.ActivationProgress;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertConfiguration; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertConfiguration;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertSet; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertSet;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.util.TimeUtil; import info.nightscout.androidaps.plugins.pump.omnipod.driver.util.TimeUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodActiveAlertsChanged; import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodActiveAlertsChanged;
@ -275,13 +273,6 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
// When PodStateManager is created, which causes an IllegalArgumentException for DateTimeZones not being recognized // When PodStateManager is created, which causes an IllegalArgumentException for DateTimeZones not being recognized
podStateManager.loadPodState(); podStateManager.loadPodState();
// BS @ 2020-10-17 FIXME: for backwards compatibility; remove before release
if (podStateManager.isPodInitialized() &&
podStateManager.getActivationProgress() == ActivationProgress.NONE &&
podStateManager.getPodProgressStatus().isAtLeast(PodProgressStatus.ABOVE_FIFTY_UNITS)) {
podStateManager.setActivationProgress(ActivationProgress.COMPLETED);
}
lastConnectionTimeMillis = sp.getLong( lastConnectionTimeMillis = sp.getLong(
RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L); RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L);
@ -907,7 +898,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
@Override @Override
public boolean isUnreachableAlertTimeoutExceeded(long unreachableTimeoutMilliseconds) { public boolean isUnreachableAlertTimeoutExceeded(long unreachableTimeoutMilliseconds) {
// We have a separate notification for when no Pod is active, see doPodCheck() // We have a separate notification for when no Pod is active, see doPodCheck()
if (podStateManager.isPodActivationCompleted() && podStateManager.getLastSuccessfulCommunication() != null) { // Null check for backwards compatibility if (podStateManager.isPodActivationCompleted() && podStateManager.getLastSuccessfulCommunication() != null) {
long currentTimeMillis = System.currentTimeMillis(); long currentTimeMillis = System.currentTimeMillis();
if (podStateManager.getLastSuccessfulCommunication().getMillis() + unreachableTimeoutMilliseconds < currentTimeMillis) { if (podStateManager.getLastSuccessfulCommunication().getMillis() + unreachableTimeoutMilliseconds < currentTimeMillis) {
@ -1002,10 +993,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
aapsLogger.debug(LTag.PUMP, "Not retrieving Pod status on startup: no Pod running"); aapsLogger.debug(LTag.PUMP, "Not retrieving Pod status on startup: no Pod running");
} }
Bundle params = new Bundle(); fabricPrivacy.logCustom("OmnipodPumpInit");
params.putString("version", BuildConfig.VERSION);
fabricPrivacy.logCustom("OmnipodPumpInit", params);
} }
@NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) { @NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) {