diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java index 318c37b2dd..7e294225c1 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java @@ -182,7 +182,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, pumpDescription = new PumpDescription(pumpType); customActions.add(new CustomAction( - R.string.omnipod_custom_action_reset_rileylink, OmnipodCustomActionType.ResetRileyLinkConfiguration, true)); + R.string.omnipod_custom_action_reset_rileylink, OmnipodCustomActionType.RESET_RILEY_LINK_CONFIGURATION, true)); this.serviceConnection = new ServiceConnection() { @Override @@ -252,12 +252,13 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, .toObservable(EventPreferenceChange.class) .observeOn(Schedulers.io()) .subscribe(event -> { - if ((event.isChanged(getResourceHelper(), R.string.key_omnipod_beep_basal_enabled)) || - (event.isChanged(getResourceHelper(), R.string.key_omnipod_beep_bolus_enabled)) || - (event.isChanged(getResourceHelper(), R.string.key_omnipod_beep_tbr_enabled)) || - (event.isChanged(getResourceHelper(), R.string.key_omnipod_pod_debugging_options_enabled)) || - (event.isChanged(getResourceHelper(), R.string.key_omnipod_beep_smb_enabled)) || - (event.isChanged(getResourceHelper(), R.string.key_omnipod_timechange_enabled))) + if ((event.isChanged(getResourceHelper(), R.string.key_omnipod_basal_beeps_enabled)) || + (event.isChanged(getResourceHelper(), R.string.key_omnipod_bolus_beeps_enabled)) || + (event.isChanged(getResourceHelper(), R.string.key_omnipod_tbr_beeps_enabled)) || + (event.isChanged(getResourceHelper(), R.string.key_omnipod_smb_beeps_enabled)) || + (event.isChanged(getResourceHelper(), R.string.key_omnipod_suspend_delivery_button_enabled)) || + (event.isChanged(getResourceHelper(), R.string.key_omnipod_pulse_log_button_enabled)) || + (event.isChanged(getResourceHelper(), R.string.key_omnipod_time_change_event_enabled))) aapsOmnipodManager.reloadSettings(); }, fabricPrivacy::logException) ); @@ -269,8 +270,8 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, // If so, add it to history // Needs to be done after EventAppInitialized because otherwise, TreatmentsPlugin.onStart() hasn't been called yet // so it didn't initialize a TreatmentService yet, resulting in a NullPointerException - if (sp.contains(OmnipodStorageKeys.Prefs.ActiveBolus)) { - String activeBolusString = sp.getString(OmnipodStorageKeys.Prefs.ActiveBolus, ""); + if (sp.contains(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS)) { + String activeBolusString = sp.getString(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS, ""); aapsLogger.warn(LTag.PUMP, "Found active bolus in SP: {}. Adding Treatment.", activeBolusString); try { ActiveBolus activeBolus = aapsOmnipodUtil.getGsonInstance().fromJson(activeBolusString, ActiveBolus.class); @@ -278,7 +279,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, } catch (Exception ex) { aapsLogger.error(LTag.PUMP, "Failed to add active bolus to history", ex); } - sp.remove(OmnipodStorageKeys.Prefs.ActiveBolus); + sp.remove(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS); } }, fabricPrivacy::logException) ); @@ -411,9 +412,9 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, while (iterator.hasNext()) { OmnipodStatusRequestType statusRequest = iterator.next(); switch (statusRequest) { - case GetPodPulseLog: + case GET_PULSE_LOG: try { - PodInfoRecentPulseLog result = executeCommand(OmnipodCommandType.GetPodPulseLog, aapsOmnipodManager::readPulseLog); + PodInfoRecentPulseLog result = executeCommand(OmnipodCommandType.GET_POD_PULSE_LOG, aapsOmnipodManager::readPulseLog); Intent i = new Intent(context, ErrorHelperActivity.class); i.putExtra("soundid", 0); i.putExtra("status", "Pulse Log (copied to clipboard):\n" + result.toString()); @@ -431,11 +432,14 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, context.startActivity(i); } break; - case AcknowledgeAlerts: - executeCommand(OmnipodCommandType.AcknowledgeAlerts, aapsOmnipodManager::acknowledgeAlerts); + case ACKNOWLEDGE_ALERTS: + executeCommand(OmnipodCommandType.ACKNOWLEDGE_ALERTS, aapsOmnipodManager::acknowledgeAlerts); break; - case GetPodState: - executeCommand(OmnipodCommandType.GetPodStatus, aapsOmnipodManager::getPodStatus); + case GET_POD_STATE: + executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus); + break; + case SUSPEND_DELIVERY: + executeCommand(OmnipodCommandType.SUSPEND_DELIVERY, aapsOmnipodManager::suspendDelivery); break; default: aapsLogger.error(LTag.PUMP, "Unknown status request: " + statusRequest.name()); @@ -443,7 +447,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, iterator.remove(); } } else if (this.hasTimeDateOrTimeZoneChanged) { - PumpEnactResult result = executeCommand(OmnipodCommandType.SetTime, aapsOmnipodManager::setTime); + PumpEnactResult result = executeCommand(OmnipodCommandType.SET_TIME, aapsOmnipodManager::setTime); if (result.success) { this.hasTimeDateOrTimeZoneChanged = false; @@ -469,7 +473,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, @NotNull @Override public PumpEnactResult setNewBasalProfile(Profile profile) { - PumpEnactResult result = executeCommand(OmnipodCommandType.SetBasalProfile, () -> aapsOmnipodManager.setBasalProfile(profile)); + PumpEnactResult result = executeCommand(OmnipodCommandType.SET_BASAL_PROFILE, () -> aapsOmnipodManager.setBasalProfile(profile)); aapsLogger.info(LTag.PUMP, "Basal Profile was set: " + result.success); @@ -492,7 +496,9 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, @Override public boolean isThisProfileSet(Profile profile) { if (!podStateManager.isPodActivationCompleted()) { - return false; + // When no Pod is active, return true here in order to prevent AAPS from setting a profile + // When we activate a new Pod, we just use ProfileFunction to set the currently active profile + return true; } return podStateManager.getBasalSchedule().equals(AapsOmnipodManager.mapProfileToBasalSchedule(profile)); } @@ -560,7 +566,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, @Override public void stopBolusDelivering() { - executeCommand(OmnipodCommandType.CancelBolus, aapsOmnipodManager::cancelBolus); + executeCommand(OmnipodCommandType.CANCEL_BOLUS, aapsOmnipodManager::cancelBolus); } // if enforceNew===true current temp basal is canceled and new TBR set (duration is prolonged), @@ -586,12 +592,12 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, } } - PumpEnactResult result = executeCommand(OmnipodCommandType.SetTemporaryBasal, () -> aapsOmnipodManager.setTemporaryBasal(new TempBasalPair(absoluteRate, false, durationInMinutes))); + PumpEnactResult result = executeCommand(OmnipodCommandType.SET_TEMPORARY_BASAL, () -> aapsOmnipodManager.setTemporaryBasal(new TempBasalPair(absoluteRate, false, durationInMinutes))); aapsLogger.info(LTag.PUMP, "setTempBasalAbsolute - setTBR. Response: " + result.success); if (result.success) { - incrementStatistics(OmnipodStorageKeys.Statistics.TBRsSet); + incrementStatistics(OmnipodStorageKeys.Statistics.TBRS_SET); } return result; @@ -607,7 +613,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, return new PumpEnactResult(getInjector()).success(true).enacted(false); } - PumpEnactResult result = executeCommand(OmnipodCommandType.CancelTemporaryBasal, aapsOmnipodManager::cancelTemporaryBasal); + PumpEnactResult result = executeCommand(OmnipodCommandType.CANCEL_TEMPORARY_BASAL, aapsOmnipodManager::cancelTemporaryBasal); if (result.success) { // TODO is this necessary? @@ -733,7 +739,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, OmnipodCustomActionType mcat = (OmnipodCustomActionType) customActionType; switch (mcat) { - case ResetRileyLinkConfiguration: + case RESET_RILEY_LINK_CONFIGURATION: serviceTaskExecutor.startTask(new ResetRileyLinkConfigurationTask(getInjector())); break; @@ -836,7 +842,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, private void initializeAfterRileyLinkConnection() { if (podStateManager.isPodInitialized() && podStateManager.getPodProgressStatus().isAtLeast(PodProgressStatus.PAIRING_COMPLETED)) { - PumpEnactResult result = executeCommand(OmnipodCommandType.GetPodStatus, aapsOmnipodManager::getPodStatus); + PumpEnactResult result = executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus); if (result.success) { aapsLogger.debug(LTag.PUMP, "Successfully retrieved Pod status on startup"); } else { @@ -859,11 +865,11 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, } @NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) { - PumpEnactResult result = executeCommand(OmnipodCommandType.SetBolus, () -> aapsOmnipodManager.bolus(detailedBolusInfo)); + PumpEnactResult result = executeCommand(OmnipodCommandType.SET_BOLUS, () -> aapsOmnipodManager.bolus(detailedBolusInfo)); if (result.success) { - incrementStatistics(detailedBolusInfo.isSMB ? OmnipodStorageKeys.Statistics.SMBBoluses - : OmnipodStorageKeys.Statistics.StandardBoluses); + incrementStatistics(detailedBolusInfo.isSMB ? OmnipodStorageKeys.Statistics.SMB_BOLUSES_DELIVERED + : OmnipodStorageKeys.Statistics.STANDARD_BOLUSES_DELIVERED); result.carbsDelivered(detailedBolusInfo.carbs); } @@ -874,7 +880,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, private T executeCommand(OmnipodCommandType commandType, Supplier supplier) { aapsLogger.debug(LTag.PUMP, "Executing command: {}", commandType); - rileyLinkUtil.getRileyLinkHistory().add(new RLHistoryItemOmnipod(commandType)); + rileyLinkUtil.getRileyLinkHistory().add(new RLHistoryItemOmnipod(getInjector(), commandType)); T pumpEnactResult = supplier.get(); diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/data/RLHistoryItemOmnipod.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/data/RLHistoryItemOmnipod.java index ad103b69e6..fee331d4ac 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/data/RLHistoryItemOmnipod.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/data/RLHistoryItemOmnipod.java @@ -2,6 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.data; import org.joda.time.LocalDateTime; +import javax.inject.Inject; + +import dagger.android.HasAndroidInjector; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.RLHistoryItem; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice; import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodCommandType; @@ -9,17 +12,19 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper; public class RLHistoryItemOmnipod extends RLHistoryItem { + @Inject ResourceHelper resourceHelper; private final OmnipodCommandType omnipodCommandType; - public RLHistoryItemOmnipod(OmnipodCommandType omnipodCommandType) { + public RLHistoryItemOmnipod(HasAndroidInjector injector, OmnipodCommandType omnipodCommandType) { super(new LocalDateTime(), RLHistoryItemSource.OmnipodCommand, RileyLinkTargetDevice.Omnipod); + injector.androidInjector().inject(this); this.omnipodCommandType = omnipodCommandType; } @Override public String getDescription(ResourceHelper resourceHelper) { if (RLHistoryItemSource.OmnipodCommand.equals(source)) { - return omnipodCommandType.name(); + return resourceHelper.gs(omnipodCommandType.getResourceId()); } return super.getDescription(resourceHelper); } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCommandType.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCommandType.java index 7f1f441894..5bb6bcdb2e 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCommandType.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCommandType.java @@ -1,20 +1,33 @@ package info.nightscout.androidaps.plugins.pump.omnipod.definition; +import info.nightscout.androidaps.plugins.pump.omnipod.R; + /** * Created by andy on 4.8.2019 */ public enum OmnipodCommandType { - PairAndPrimePod, // First step of Pod activation - FillCanulaAndSetBasalProfile, // Second step of Pod activation - DeactivatePod, // - SetBasalProfile, // - SetBolus, // - CancelBolus, // - SetTemporaryBasal, // - CancelTemporaryBasal, // - ResetPodStatus, // - GetPodStatus, // - SetTime, // - AcknowledgeAlerts, // - GetPodPulseLog; + PAIR_AND_PRIME_POD(R.string.omnipod_cmd_pair_and_prime), // First step of Pod activation + FILL_CANNULA_AND_SET_BASAL_PROFILE(R.string.omnipod_cmd_fill_cannula_set_basal_profile), // Second step of Pod activation + DEACTIVATE_POD(R.string.omnipod_cmd_deactivate_pod), // + SET_BASAL_PROFILE(R.string.omnipod_cmd_set_basal_schedule), // + SET_BOLUS(R.string.omnipod_cmd_set_bolus), // + CANCEL_BOLUS(R.string.omnipod_cmd_cancel_bolus), // + SET_TEMPORARY_BASAL(R.string.omnipod_cmd_set_tbr), // + CANCEL_TEMPORARY_BASAL(R.string.omnipod_cmd_cancel_tbr_by_driver), // + DISCARD_POD(R.string.omnipod_cmd_discard_pod), // + GET_POD_STATUS(R.string.omnipod_cmd_get_pod_status), // + SET_TIME(R.string.omnipod_cmd_set_time), // + ACKNOWLEDGE_ALERTS(R.string.omnipod_cmd_acknowledge_alerts), // + GET_POD_PULSE_LOG(R.string.omnipod_cmd_get_pulse_log), // + SUSPEND_DELIVERY(R.string.omnipod_cmd_suspend_delivery); + + private int resourceId; + + OmnipodCommandType(int resourceId) { + this.resourceId = resourceId; + } + + public int getResourceId() { + return resourceId; + } } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCustomActionType.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCustomActionType.java index 1ec5e4bfdc..9d9fbf3f13 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCustomActionType.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodCustomActionType.java @@ -7,7 +7,7 @@ import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; */ public enum OmnipodCustomActionType implements CustomActionType { - ResetRileyLinkConfiguration; + RESET_RILEY_LINK_CONFIGURATION; @Override public String getKey() { diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStatusRequestType.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStatusRequestType.java index c1bc77aff4..c657f6fc6e 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStatusRequestType.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStatusRequestType.java @@ -1,7 +1,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.definition; public enum OmnipodStatusRequestType { - AcknowledgeAlerts, - GetPodState, - GetPodPulseLog + ACKNOWLEDGE_ALERTS, + GET_POD_STATE, + GET_PULSE_LOG, + SUSPEND_DELIVERY } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStorageKeys.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStorageKeys.java index 1f689bd807..7a7ce00fae 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStorageKeys.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/OmnipodStorageKeys.java @@ -3,23 +3,23 @@ package info.nightscout.androidaps.plugins.pump.omnipod.definition; import info.nightscout.androidaps.plugins.pump.omnipod.R; public class OmnipodStorageKeys { - private static final String Prefix = "AAPS.Omnipod."; + private static final String PREFIX = "AAPS.Omnipod."; - public static class Prefs { - public static final String PodState = Prefix + "pod_state"; - public static final String ActiveBolus = Prefix + "current_bolus"; - public static final int BeepBasalEnabled = R.string.key_omnipod_beep_basal_enabled; - public static final int BeepBolusEnabled = R.string.key_omnipod_beep_bolus_enabled; - public static final int BeepSMBEnabled = R.string.key_omnipod_beep_smb_enabled; - public static final int BeepTBREnabled = R.string.key_omnipod_beep_tbr_enabled; - public static final int PodDebuggingOptionsEnabled = R.string.key_omnipod_pod_debugging_options_enabled; - public static final int TimeChangeEventEnabled = R.string.key_omnipod_timechange_enabled; + public static class Preferences { + public static final String POD_STATE = PREFIX + "pod_state"; + public static final String ACTIVE_BOLUS = PREFIX + "current_bolus"; + public static final int BASAL_BEEPS_ENABLED = R.string.key_omnipod_basal_beeps_enabled; + public static final int BOLUS_BEEPS_ENABLED = R.string.key_omnipod_bolus_beeps_enabled; + public static final int SMB_BEEPS_ENABLED = R.string.key_omnipod_smb_beeps_enabled; + public static final int TBR_BEEPS_ENABLED = R.string.key_omnipod_tbr_beeps_enabled; + public static final int SUSPEND_DELIVERY_BUTTON_ENABLED = R.string.key_omnipod_pulse_log_button_enabled; + public static final int PULSE_LOG_BUTTON_ENABLED = R.string.key_omnipod_pulse_log_button_enabled; + public static final int TIME_CHANGE_EVENT_ENABLED = R.string.key_omnipod_time_change_event_enabled; } public static class Statistics { - static final String StatsPrefix = "omnipod_"; - public static final String TBRsSet = StatsPrefix + "tbrs_set"; - public static final String StandardBoluses = StatsPrefix + "std_boluses_delivered"; - public static final String SMBBoluses = StatsPrefix + "smb_boluses_delivered"; + public static final String TBRS_SET = PREFIX + "tbrs_set"; + public static final String STANDARD_BOLUSES_DELIVERED = PREFIX + "std_boluses_delivered"; + public static final String SMB_BOLUSES_DELIVERED = PREFIX + "smb_boluses_delivered"; } } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodHistoryEntryType.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodHistoryEntryType.java index 1007c18cbc..1965f26d8b 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodHistoryEntryType.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodHistoryEntryType.java @@ -13,31 +13,31 @@ import info.nightscout.androidaps.plugins.pump.omnipod.R; */ public enum PodHistoryEntryType { - PairAndPrime(1, R.string.omnipod_init_pod_wizard_step2_title, PumpHistoryEntryGroup.Prime), - FillCannulaSetBasalProfile(2, R.string.omnipod_init_pod_wizard_step4_title, PumpHistoryEntryGroup.Prime), - DeactivatePod(3, R.string.omnipod_cmd_deactivate_pod, PumpHistoryEntryGroup.Prime), - ResetPodState(4, R.string.omnipod_cmd_reset_pod, PumpHistoryEntryGroup.Prime), + PAIR_AND_PRIME(1, R.string.omnipod_init_pod_wizard_step2_title, PumpHistoryEntryGroup.Prime), + FILL_CANNULA_SET_BASAL_PROFILE(2, R.string.omnipod_init_pod_wizard_step4_title, PumpHistoryEntryGroup.Prime), + DEACTIVATE_POD(3, R.string.omnipod_cmd_deactivate_pod, PumpHistoryEntryGroup.Prime), + RESET_POD_STATE(4, R.string.omnipod_cmd_discard_pod, PumpHistoryEntryGroup.Prime), - SetTemporaryBasal(10, R.string.omnipod_cmd_set_tbr, PumpHistoryEntryGroup.Basal), - CancelTemporaryBasal(11, R.string.omnipod_cmd_cancel_tbr, PumpHistoryEntryGroup.Basal), - CancelTemporaryBasalForce(12, R.string.omnipod_cmd_cancel_tbr_forced, PumpHistoryEntryGroup.Basal), + SET_TEMPORARY_BASAL(10, R.string.omnipod_cmd_set_tbr, PumpHistoryEntryGroup.Basal), + CANCEL_TEMPORARY_BASAL_BY_DRIVER(11, R.string.omnipod_cmd_cancel_tbr_by_driver, PumpHistoryEntryGroup.Basal), + CANCEL_TEMPORARY_BASAL(12, R.string.omnipod_cmd_cancel_tbr, PumpHistoryEntryGroup.Basal), - SetBasalSchedule(20, R.string.omnipod_cmd_set_basal_schedule, PumpHistoryEntryGroup.Basal), + SET_BASAL_SCHEDULE(20, R.string.omnipod_cmd_set_basal_schedule, PumpHistoryEntryGroup.Basal), - GetPodStatus(30, R.string.omnipod_cmd_get_pod_status, PumpHistoryEntryGroup.Configuration), - GetPodInfo(31, R.string.omnipod_cmd_get_pod_info, PumpHistoryEntryGroup.Configuration), - SetTime(32, R.string.omnipod_cmd_set_time, PumpHistoryEntryGroup.Configuration), + GET_POD_STATUS(30, R.string.omnipod_cmd_get_pod_status, PumpHistoryEntryGroup.Configuration), + GET_POD_INFO(31, R.string.omnipod_cmd_get_pod_info, PumpHistoryEntryGroup.Configuration), + SET_TIME(32, R.string.omnipod_cmd_set_time, PumpHistoryEntryGroup.Configuration), - SetBolus(40, R.string.omnipod_cmd_set_bolus, PumpHistoryEntryGroup.Bolus), - CancelBolus(41, R.string.omnipod_cmd_cancel_bolus, PumpHistoryEntryGroup.Bolus), + SET_BOLUS(40, R.string.omnipod_cmd_set_bolus, PumpHistoryEntryGroup.Bolus), + CANCEL_BOLUS(41, R.string.omnipod_cmd_cancel_bolus, PumpHistoryEntryGroup.Bolus), - ConfigureAlerts(50, R.string.omnipod_cmd_configure_alerts, PumpHistoryEntryGroup.Alarm), - AcknowledgeAlerts(51, R.string.omnipod_cmd_acknowledge_alerts, PumpHistoryEntryGroup.Alarm), + CONFIGURE_ALERTS(50, R.string.omnipod_cmd_configure_alerts, PumpHistoryEntryGroup.Alarm), + ACKNOWLEDGE_ALERTS(51, R.string.omnipod_cmd_acknowledge_alerts, PumpHistoryEntryGroup.Alarm), - SuspendDelivery(60, R.string.omnipod_cmd_suspend_delivery, PumpHistoryEntryGroup.Basal), - ResumeDelivery(61, R.string.omnipod_cmd_resume_delivery, PumpHistoryEntryGroup.Basal), + SUSPEND_DELIVERY(60, R.string.omnipod_cmd_suspend_delivery, PumpHistoryEntryGroup.Basal), + RESUME_DELIVERY(61, R.string.omnipod_cmd_resume_delivery, PumpHistoryEntryGroup.Basal), - UnknownEntryType(99, R.string.omnipod_cmd_unknown_entry); + UNKNOWN_ENTRY_TYPE(99, R.string.omnipod_cmd_unknown_entry); private int code; private static final Map instanceMap; @@ -82,7 +82,7 @@ public enum PodHistoryEntryType { if (instanceMap.containsKey(code)) { return instanceMap.get(code); } else { - return UnknownEntryType; + return UNKNOWN_ENTRY_TYPE; } } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodInitActionType.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodInitActionType.java index cdc1a2701a..1424712010 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodInitActionType.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/definition/PodInitActionType.java @@ -7,17 +7,17 @@ import info.nightscout.androidaps.plugins.pump.omnipod.R; public enum PodInitActionType { - PairAndPrimeWizardStep(), // - PairPod(R.string.omnipod_init_pod_pair_pod, PairAndPrimeWizardStep), // - PrimePod(R.string.omnipod_init_pod_prime_pod, PairAndPrimeWizardStep), // + PAIR_AND_PRIME_WIZARD_STEP(), // + PAIR_POD(R.string.omnipod_init_pod_pair_pod, PAIR_AND_PRIME_WIZARD_STEP), // + PRIME_POD(R.string.omnipod_init_pod_prime_pod, PAIR_AND_PRIME_WIZARD_STEP), // - FillCannulaSetBasalProfileWizardStep(), // - FillCannula(R.string.omnipod_init_pod_fill_cannula, FillCannulaSetBasalProfileWizardStep), // - SetBasalProfile(R.string.omnipod_init_pod_set_basal_profile, FillCannulaSetBasalProfileWizardStep), // + FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP(), // + FILL_CANNULA(R.string.omnipod_init_pod_fill_cannula, FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP), // + SET_BASAL_PROFILE(R.string.omnipod_init_pod_set_basal_profile, FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP), // - DeactivatePodWizardStep(), // - CancelDelivery(R.string.omnipod_deactivate_pod_cancel_delivery, DeactivatePodWizardStep), // - DeactivatePod(R.string.omnipod_deactivate_pod_deactivate_pod, DeactivatePodWizardStep); + DEACTIVATE_POD_WIZARD_STEP(), // + CANCEL_DELIVERY(R.string.omnipod_deactivate_pod_cancel_delivery, DEACTIVATE_POD_WIZARD_STEP), // + DEACTIVATE_POD(R.string.omnipod_deactivate_pod_deactivate_pod, DEACTIVATE_POD_WIZARD_STEP); private int resourceId; private PodInitActionType parent; diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java index 72e647f250..b1033ce721 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/OmnipodManager.java @@ -468,7 +468,7 @@ public class OmnipodManager { logCommandExecutionFinished("deactivatePod"); } - podStateManager.removeState(); + podStateManager.discardState(); } public OmnipodRileyLinkCommunicationManager getCommunicationService() { diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java index 003f839b16..ddc6291c6d 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/manager/PodStateManager.java @@ -43,7 +43,7 @@ public abstract class PodStateManager { this.gsonInstance = createGson(); } - public final void removeState() { + public final void discardState() { this.podState = null; storePodState(); } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java index c3c430217f..ba6118be0e 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsOmnipodManager.java @@ -96,7 +96,8 @@ public class AapsOmnipodManager { private boolean bolusBeepsEnabled; private boolean smbBeepsEnabled; private boolean tbrBeepsEnabled; - private boolean podDebuggingOptionsEnabled; + private boolean suspendDeliveryButtonEnabled; + private boolean pulseLogButtonEnabled; private boolean timeChangeEventEnabled; @Inject @@ -135,16 +136,17 @@ public class AapsOmnipodManager { } public void reloadSettings() { - basalBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Prefs.BeepBasalEnabled, true); - bolusBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Prefs.BeepBolusEnabled, true); - smbBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Prefs.BeepSMBEnabled, true); - tbrBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Prefs.BeepTBREnabled, true); - podDebuggingOptionsEnabled = sp.getBoolean(OmnipodStorageKeys.Prefs.PodDebuggingOptionsEnabled, false); - timeChangeEventEnabled = sp.getBoolean(OmnipodStorageKeys.Prefs.TimeChangeEventEnabled, true); + basalBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.BASAL_BEEPS_ENABLED, true); + bolusBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.BOLUS_BEEPS_ENABLED, true); + smbBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.SMB_BEEPS_ENABLED, true); + tbrBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.TBR_BEEPS_ENABLED, true); + suspendDeliveryButtonEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.SUSPEND_DELIVERY_BUTTON_ENABLED, false); + pulseLogButtonEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.PULSE_LOG_BUTTON_ENABLED, false); + timeChangeEventEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.TIME_CHANGE_EVENT_ENABLED, true); } public PumpEnactResult pairAndPrime(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver) { - if (podInitActionType != PodInitActionType.PairAndPrimeWizardStep) { + if (podInitActionType != PodInitActionType.PAIR_AND_PRIME_WIZARD_STEP) { return new PumpEnactResult(injector).success(false).enacted(false).comment(getStringResource(R.string.omnipod_error_illegal_init_action_type, podInitActionType.name())); } @@ -158,13 +160,13 @@ public class AapsOmnipodManager { } catch (Exception ex) { String comment = handleAndTranslateException(ex); podInitReceiver.returnInitTaskStatus(podInitActionType, false, comment); - addFailureToHistory(time, PodHistoryEntryType.PairAndPrime, comment); + addFailureToHistory(time, PodHistoryEntryType.PAIR_AND_PRIME, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } } public PumpEnactResult setInitialBasalScheduleAndInsertCannula(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver, Profile profile) { - if (podInitActionType != PodInitActionType.FillCannulaSetBasalProfileWizardStep) { + if (podInitActionType != PodInitActionType.FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP) { return new PumpEnactResult(injector).success(false).enacted(false).comment(getStringResource(R.string.omnipod_error_illegal_init_action_type, podInitActionType.name())); } @@ -186,7 +188,7 @@ public class AapsOmnipodManager { } catch (Exception ex) { String comment = handleAndTranslateException(ex); podInitReceiver.returnInitTaskStatus(podInitActionType, false, comment); - addFailureToHistory(time, PodHistoryEntryType.FillCannulaSetBasalProfile, comment); + addFailureToHistory(time, PodHistoryEntryType.FILL_CANNULA_SET_BASAL_PROFILE, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } } @@ -195,11 +197,11 @@ public class AapsOmnipodManager { long time = System.currentTimeMillis(); try { StatusResponse statusResponse = delegate.getPodStatus(); - addSuccessToHistory(time, PodHistoryEntryType.GetPodStatus, statusResponse); + addSuccessToHistory(time, PodHistoryEntryType.GET_POD_STATUS, statusResponse); return new PumpEnactResult(injector).success(true).enacted(false); } catch (Exception ex) { String comment = handleAndTranslateException(ex); - addFailureToHistory(time, PodHistoryEntryType.GetPodStatus, comment); + addFailureToHistory(time, PodHistoryEntryType.GET_POD_STATUS, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } } @@ -210,16 +212,16 @@ public class AapsOmnipodManager { delegate.deactivatePod(); } catch (Exception ex) { String comment = handleAndTranslateException(ex); - podInitReceiver.returnInitTaskStatus(PodInitActionType.DeactivatePodWizardStep, false, comment); - addFailureToHistory(time, PodHistoryEntryType.DeactivatePod, comment); + podInitReceiver.returnInitTaskStatus(PodInitActionType.DEACTIVATE_POD_WIZARD_STEP, false, comment); + addFailureToHistory(time, PodHistoryEntryType.DEACTIVATE_POD, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } reportImplicitlyCanceledTbr(); - addSuccessToHistory(time, PodHistoryEntryType.DeactivatePod, null); + addSuccessToHistory(time, PodHistoryEntryType.DEACTIVATE_POD, null); - podInitReceiver.returnInitTaskStatus(PodInitActionType.DeactivatePodWizardStep, true, null); + podInitReceiver.returnInitTaskStatus(PodInitActionType.DEACTIVATE_POD_WIZARD_STEP, true, null); return new PumpEnactResult(injector).success(true).enacted(true); } @@ -236,28 +238,28 @@ public class AapsOmnipodManager { delegate.setBasalSchedule(basalSchedule, isBasalBeepsEnabled()); // Because setting a basal profile actually suspends and then resumes delivery, TBR is implicitly cancelled reportImplicitlyCanceledTbr(); - addSuccessToHistory(time, PodHistoryEntryType.SetBasalSchedule, profile.getBasalValues()); + addSuccessToHistory(time, PodHistoryEntryType.SET_BASAL_SCHEDULE, profile.getBasalValues()); } catch (Exception ex) { if ((ex instanceof OmnipodException) && !((OmnipodException) ex).isCertainFailure()) { reportImplicitlyCanceledTbr(); - addToHistory(time, PodHistoryEntryType.SetBasalSchedule, "Uncertain failure", false); + addToHistory(time, PodHistoryEntryType.SET_BASAL_SCHEDULE, "Uncertain failure", false); return new PumpEnactResult(injector).success(false).enacted(false).comment(getStringResource(R.string.omnipod_error_set_basal_failed_uncertain)); } String comment = handleAndTranslateException(ex); reportImplicitlyCanceledTbr(); - addFailureToHistory(time, PodHistoryEntryType.SetBasalSchedule, comment); + addFailureToHistory(time, PodHistoryEntryType.SET_BASAL_SCHEDULE, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } return new PumpEnactResult(injector).success(true).enacted(true); } - public PumpEnactResult resetPodStatus() { - podStateManager.removeState(); + public PumpEnactResult discardPodState() { + podStateManager.discardState(); reportImplicitlyCanceledTbr(); - addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.ResetPodState, null); + addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.RESET_POD_STATE, null); return new PumpEnactResult(injector).success(true).enacted(true); } @@ -280,7 +282,7 @@ public class AapsOmnipodManager { bolusStarted = new Date(); } catch (Exception ex) { String comment = handleAndTranslateException(ex); - addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.SetBolus, comment); + addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.SET_BOLUS, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } @@ -312,7 +314,7 @@ public class AapsOmnipodManager { // I discussed this with the AAPS team but nobody seems to care so we're stuck with this ugly workaround for now try { ActiveBolus activeBolus = ActiveBolus.fromDetailedBolusInfo(detailedBolusInfo); - sp.putString(OmnipodStorageKeys.Prefs.ActiveBolus, aapsOmnipodUtil.getGsonInstance().toJson(activeBolus)); + sp.putString(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS, aapsOmnipodUtil.getGsonInstance().toJson(activeBolus)); aapsLogger.debug(LTag.PUMP, "Stored active bolus to SP for recovery"); } catch (Exception ex) { aapsLogger.error(LTag.PUMP, "Failed to store active bolus to SP", ex); @@ -331,7 +333,7 @@ public class AapsOmnipodManager { addBolusToHistory(detailedBolusInfo); - sp.remove(OmnipodStorageKeys.Prefs.ActiveBolus); + sp.remove(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS); return new PumpEnactResult(injector).success(true).enacted(true).bolusDelivered(detailedBolusInfo.insulin); } @@ -347,7 +349,7 @@ public class AapsOmnipodManager { } else { aapsLogger.debug(LTag.PUMP, "Not cancelling bolus: bolus command failed"); String comment = getStringResource(R.string.omnipod_bolus_did_not_succeed); - addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.CancelBolus, comment); + addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, comment); return new PumpEnactResult(injector).success(true).enacted(false).comment(comment); } } @@ -358,12 +360,12 @@ public class AapsOmnipodManager { try { delegate.cancelBolus(isBolusBeepsEnabled()); aapsLogger.debug(LTag.PUMP, "Successfully cancelled bolus", i); - addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CancelBolus, null); + addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, null); return new PumpEnactResult(injector).success(true).enacted(true); } catch (PodFaultException ex) { aapsLogger.debug(LTag.PUMP, "Successfully cancelled bolus (implicitly because of a Pod Fault)"); showPodFaultErrorDialog(ex.getFaultEvent().getFaultEventCode(), null); - addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CancelBolus, null); + addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, null); return new PumpEnactResult(injector).success(true).enacted(true); } catch (Exception ex) { aapsLogger.debug(LTag.PUMP, "Failed to cancel bolus", ex); @@ -371,7 +373,7 @@ public class AapsOmnipodManager { } } - addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.CancelBolus, comment); + addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } @@ -383,17 +385,17 @@ public class AapsOmnipodManager { time = System.currentTimeMillis(); } catch (Exception ex) { if ((ex instanceof OmnipodException) && !((OmnipodException) ex).isCertainFailure()) { - addToHistory(time, PodHistoryEntryType.SetTemporaryBasal, "Uncertain failure", false); + addToHistory(time, PodHistoryEntryType.SET_TEMPORARY_BASAL, "Uncertain failure", false); return new PumpEnactResult(injector).success(false).enacted(false).comment(getStringResource(R.string.omnipod_error_set_temp_basal_failed_uncertain)); } String comment = handleAndTranslateException(ex); - addFailureToHistory(time, PodHistoryEntryType.SetTemporaryBasal, comment); + addFailureToHistory(time, PodHistoryEntryType.SET_TEMPORARY_BASAL, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } reportImplicitlyCanceledTbr(); - long pumpId = addSuccessToHistory(time, PodHistoryEntryType.SetTemporaryBasal, tempBasalPair); + long pumpId = addSuccessToHistory(time, PodHistoryEntryType.SET_TEMPORARY_BASAL, tempBasalPair); TemporaryBasal tempStart = new TemporaryBasal(injector) // .date(time) // @@ -411,10 +413,10 @@ public class AapsOmnipodManager { long time = System.currentTimeMillis(); try { delegate.cancelTemporaryBasal(isTbrBeepsEnabled()); - addSuccessToHistory(time, PodHistoryEntryType.CancelTemporaryBasalForce, null); + addSuccessToHistory(time, PodHistoryEntryType.CANCEL_TEMPORARY_BASAL, null); } catch (Exception ex) { String comment = handleAndTranslateException(ex); - addFailureToHistory(time, PodHistoryEntryType.CancelTemporaryBasalForce, comment); + addFailureToHistory(time, PodHistoryEntryType.CANCEL_TEMPORARY_BASAL, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } @@ -425,10 +427,10 @@ public class AapsOmnipodManager { long time = System.currentTimeMillis(); try { delegate.acknowledgeAlerts(); - addSuccessToHistory(time, PodHistoryEntryType.AcknowledgeAlerts, null); + addSuccessToHistory(time, PodHistoryEntryType.ACKNOWLEDGE_ALERTS, null); } catch (Exception ex) { String comment = handleAndTranslateException(ex); - addFailureToHistory(time, PodHistoryEntryType.AcknowledgeAlerts, comment); + addFailureToHistory(time, PodHistoryEntryType.ACKNOWLEDGE_ALERTS, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } return new PumpEnactResult(injector).success(true).enacted(true); @@ -442,11 +444,11 @@ public class AapsOmnipodManager { // because the pod state we keep, doesn't get updated from a PodInfoResponse. // We use StatusResponses for that, which can be obtained from the getPodStatus method PodInfoResponse podInfo = delegate.getPodInfo(podInfoType); - addSuccessToHistory(time, PodHistoryEntryType.GetPodInfo, podInfo); + addSuccessToHistory(time, PodHistoryEntryType.GET_POD_INFO, podInfo); return new PumpEnactResult(injector).success(true).enacted(true); } catch (Exception ex) { String comment = handleAndTranslateException(ex); - addFailureToHistory(time, PodHistoryEntryType.GetPodInfo, comment); + addFailureToHistory(time, PodHistoryEntryType.GET_POD_INFO, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } } @@ -480,16 +482,16 @@ public class AapsOmnipodManager { delegate.setTime(isBasalBeepsEnabled()); // Because set time actually suspends and then resumes delivery, TBR is implicitly cancelled reportImplicitlyCanceledTbr(); - addSuccessToHistory(time, PodHistoryEntryType.SetTime, null); + addSuccessToHistory(time, PodHistoryEntryType.SET_TIME, null); } catch (Exception ex) { if ((ex instanceof OmnipodException) && !((OmnipodException) ex).isCertainFailure()) { reportImplicitlyCanceledTbr(); - addFailureToHistory(time, PodHistoryEntryType.SetTime, "Uncertain failure"); + addFailureToHistory(time, PodHistoryEntryType.SET_TIME, "Uncertain failure"); return new PumpEnactResult(injector).success(false).enacted(false).comment(getStringResource(R.string.omnipod_error_set_time_failed_uncertain)); } String comment = handleAndTranslateException(ex); reportImplicitlyCanceledTbr(); - addFailureToHistory(time, PodHistoryEntryType.SetTime, comment); + addFailureToHistory(time, PodHistoryEntryType.SET_TIME, comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); } @@ -525,8 +527,12 @@ public class AapsOmnipodManager { return tbrBeepsEnabled; } - public boolean isPodDebuggingOptionsEnabled() { - return podDebuggingOptionsEnabled; + public boolean isSuspendDeliveryButtonEnabled() { + return suspendDeliveryButtonEnabled; + } + + public boolean isPulseLogButtonEnabled() { + return pulseLogButtonEnabled; } public boolean isTimeChangeEventEnabled() { @@ -534,7 +540,7 @@ public class AapsOmnipodManager { } public void addBolusToHistory(DetailedBolusInfo detailedBolusInfo) { - long pumpId = addSuccessToHistory(detailedBolusInfo.date, PodHistoryEntryType.SetBolus, detailedBolusInfo.insulin + ";" + detailedBolusInfo.carbs); + long pumpId = addSuccessToHistory(detailedBolusInfo.date, PodHistoryEntryType.SET_BOLUS, detailedBolusInfo.insulin + ";" + detailedBolusInfo.carbs); detailedBolusInfo.pumpId = pumpId; activePlugin.getActiveTreatments().addToHistoryTreatment(detailedBolusInfo, false); } @@ -547,7 +553,7 @@ public class AapsOmnipodManager { long time = System.currentTimeMillis() - 1000; - addSuccessToHistory(time, PodHistoryEntryType.CancelTemporaryBasal, null); + addSuccessToHistory(time, PodHistoryEntryType.CANCEL_TEMPORARY_BASAL_BY_DRIVER, null); TemporaryBasal temporaryBasal = new TemporaryBasal(injector) // .date(time) // @@ -600,10 +606,10 @@ public class AapsOmnipodManager { break; } - if (podInitActionType == PodInitActionType.PairAndPrimeWizardStep) { - addToHistory(time, PodHistoryEntryType.PairAndPrime, comment, res.getResultType().isSuccess()); + if (podInitActionType == PodInitActionType.PAIR_AND_PRIME_WIZARD_STEP) { + addToHistory(time, PodHistoryEntryType.PAIR_AND_PRIME, comment, res.getResultType().isSuccess()); } else { - addToHistory(time, PodHistoryEntryType.FillCannulaSetBasalProfile, res.getResultType().isSuccess() ? profile.getBasalValues() : comment, res.getResultType().isSuccess()); + addToHistory(time, PodHistoryEntryType.FILL_CANNULA_SET_BASAL_PROFILE, res.getResultType().isSuccess() ? profile.getBasalValues() : comment, res.getResultType().isSuccess()); } podInitReceiver.returnInitTaskStatus(podInitActionType, res.getResultType().isSuccess(), comment); diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManager.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManager.java index 48f50a01be..dc99cc5d15 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManager.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/manager/AapsPodStateManager.java @@ -28,11 +28,11 @@ public class AapsPodStateManager extends PodStateManager { @Override protected String readPodState() { - return sp.getString(OmnipodStorageKeys.Prefs.PodState, ""); + return sp.getString(OmnipodStorageKeys.Preferences.POD_STATE, ""); } @Override protected void storePodState(String podState) { - sp.putString(OmnipodStorageKeys.Prefs.PodState, podState); + sp.putString(OmnipodStorageKeys.Preferences.POD_STATE, podState); } } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/OmnipodFragment.kt b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/OmnipodFragment.kt index 093339b46c..d8c5692bb0 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/OmnipodFragment.kt +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/OmnipodFragment.kt @@ -87,12 +87,12 @@ class OmnipodFragment : DaggerFragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - omnipod_resume_delivery.setOnClickListener { + omnipod_button_resume_delivery.setOnClickListener { disablePodActionButtons() commandQueue.startPump(null) } - omnipod_pod_mgmt.setOnClickListener { + omnipod_button_pod_mgmt.setOnClickListener { if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() == true) { activity?.let { activity -> protectionCheck.queryProtection( @@ -105,13 +105,13 @@ class OmnipodFragment : DaggerFragment() { } } - omnipod_refresh.setOnClickListener { + omnipod_button_refresh_status.setOnClickListener { disablePodActionButtons() - omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.GetPodState); + omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.GET_POD_STATE); commandQueue.readStatus("Clicked Refresh", null) } - omnipod_rileylink_stats.setOnClickListener { + omnipod_button_rileylink_stats.setOnClickListener { if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() == true) { startActivity(Intent(context, RileyLinkStatusActivity::class.java)) } else { @@ -119,24 +119,22 @@ class OmnipodFragment : DaggerFragment() { } } - omnipod_pod_active_alerts_ack.setOnClickListener { - if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() != true) { - displayNotConfiguredDialog() - } else { - disablePodActionButtons() - omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.AcknowledgeAlerts); - commandQueue.readStatus("Clicked Alert Ack", null) - } + omnipod_button_acknowledge_active_alerts.setOnClickListener { + disablePodActionButtons() + omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.ACKNOWLEDGE_ALERTS); + commandQueue.readStatus("Clicked Acknowledge Alert", null) } - omnipod_pod_debug.setOnClickListener { - if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() != true) { - displayNotConfiguredDialog() - } else { - disablePodActionButtons() - omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.GetPodPulseLog); - commandQueue.readStatus("Clicked Pulse Log", null) - } + omnipod_button_suspend_delivery.setOnClickListener { + disablePodActionButtons() + omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.SUSPEND_DELIVERY); + commandQueue.readStatus("Clicked Suspend Delivery", null) + } + + omnipod_button_pulse_log.setOnClickListener { + disablePodActionButtons() + omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.GET_PULSE_LOG); + commandQueue.readStatus("Clicked Pulse Log", null) } } @@ -359,47 +357,57 @@ class OmnipodFragment : DaggerFragment() { private fun updatePodActionButtons() { updateRefreshStatusButton() - updateAcknowledgeAlertsButton() - updatePulseLogButton() updateResumeDeliveryButton() + updateAcknowledgeAlertsButton() + updateSuspendDeliveryButton() + updatePulseLogButton() } private fun disablePodActionButtons() { - omnipod_pod_active_alerts_ack.isEnabled = false - omnipod_refresh.isEnabled = false - omnipod_pod_debug.isEnabled = false - omnipod_resume_delivery.isEnabled = false + omnipod_button_acknowledge_active_alerts.isEnabled = false + omnipod_button_resume_delivery.isEnabled = false + omnipod_button_refresh_status.isEnabled = false + omnipod_button_pulse_log.isEnabled = false } private fun updateRefreshStatusButton() { - omnipod_refresh.isEnabled = podStateManager.isPodInitialized && podStateManager.podProgressStatus.isAtLeast(PodProgressStatus.PAIRING_COMPLETED) + omnipod_button_refresh_status.isEnabled = podStateManager.isPodInitialized && podStateManager.podProgressStatus.isAtLeast(PodProgressStatus.PAIRING_COMPLETED) && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() } - private fun updateAcknowledgeAlertsButton() { - if (podStateManager.isPodInitialized && podStateManager.hasActiveAlerts() && !podStateManager.isPodDead) { - omnipod_pod_active_alerts_ack.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() - } else { - omnipod_pod_active_alerts_ack.isEnabled = false - } - } - - private fun updatePulseLogButton() { - if (aapsOmnipodManager.isPodDebuggingOptionsEnabled) { - omnipod_pod_debug.visibility = View.VISIBLE - omnipod_pod_debug.isEnabled = podStateManager.isPodActivationCompleted && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() - } else { - omnipod_pod_debug.visibility = View.GONE - } - } - private fun updateResumeDeliveryButton() { val queueEmptyOrStartingPump = isQueueEmpty() || commandQueue.isRunning(Command.CommandType.START_PUMP) if (podStateManager.isPodActivationCompleted && podStateManager.isSuspended && queueEmptyOrStartingPump) { - omnipod_resume_delivery.visibility = View.VISIBLE - omnipod_resume_delivery.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() + omnipod_button_resume_delivery.visibility = View.VISIBLE + omnipod_button_resume_delivery.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() } else { - omnipod_resume_delivery.visibility = View.GONE + omnipod_button_resume_delivery.visibility = View.GONE + } + } + + private fun updateAcknowledgeAlertsButton() { + if (podStateManager.isPodInitialized && podStateManager.hasActiveAlerts() && !podStateManager.isPodDead) { + omnipod_button_acknowledge_active_alerts.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() + } else { + omnipod_button_acknowledge_active_alerts.isEnabled = false + } + } + + private fun updateSuspendDeliveryButton() { + if (aapsOmnipodManager.isSuspendDeliveryButtonEnabled) { + omnipod_button_suspend_delivery.visibility = View.VISIBLE + omnipod_button_suspend_delivery.isEnabled = podStateManager.isPodRunning && !podStateManager.isSuspended && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() + } else { + omnipod_button_suspend_delivery.visibility = View.GONE + } + } + + private fun updatePulseLogButton() { + if (aapsOmnipodManager.isPulseLogButtonEnabled) { + omnipod_button_pulse_log.visibility = View.VISIBLE + omnipod_button_pulse_log.isEnabled = podStateManager.isPodActivationCompleted && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() + } else { + omnipod_button_pulse_log.visibility = View.GONE } } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodHistoryActivity.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodHistoryActivity.java index 3bfe876e84..4913bb6614 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodHistoryActivity.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodHistoryActivity.java @@ -248,21 +248,21 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity { PodHistoryEntryType entryType = PodHistoryEntryType.getByCode(historyEntry.getPodEntryTypeCode()); switch (entryType) { - case SetTemporaryBasal: { + case SET_TEMPORARY_BASAL: { TempBasalPair tempBasalPair = aapsOmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), TempBasalPair.class); valueView.setText(resourceHelper.gs(R.string.omnipod_cmd_tbr_value, tempBasalPair.getInsulinRate(), tempBasalPair.getDurationMinutes())); } break; - case FillCannulaSetBasalProfile: - case SetBasalSchedule: { + case FILL_CANNULA_SET_BASAL_PROFILE: + case SET_BASAL_SCHEDULE: { if (historyEntry.getData() != null) { setProfileValue(historyEntry.getData(), valueView); } } break; - case SetBolus: { + case SET_BOLUS: { if (historyEntry.getData().contains(";")) { String[] splitVal = historyEntry.getData().split(";"); valueView.setText(resourceHelper.gs(R.string.omnipod_cmd_bolus_value_with_carbs, Double.valueOf(splitVal[0]), Double.valueOf(splitVal[1]))); @@ -272,20 +272,20 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity { } break; - case GetPodStatus: - case GetPodInfo: - case SetTime: - case PairAndPrime: - case CancelTemporaryBasal: - case CancelTemporaryBasalForce: - case ConfigureAlerts: - case CancelBolus: - case DeactivatePod: - case ResetPodState: - case AcknowledgeAlerts: - case SuspendDelivery: - case ResumeDelivery: - case UnknownEntryType: + case GET_POD_STATUS: + case GET_POD_INFO: + case SET_TIME: + case PAIR_AND_PRIME: + case CANCEL_TEMPORARY_BASAL_BY_DRIVER: + case CANCEL_TEMPORARY_BASAL: + case CONFIGURE_ALERTS: + case CANCEL_BOLUS: + case DEACTIVATE_POD: + case RESET_POD_STATE: + case ACKNOWLEDGE_ALERTS: + case SUSPEND_DELIVERY: + case RESUME_DELIVERY: + case UNKNOWN_ENTRY_TYPE: default: valueView.setText(""); break; diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodManagementActivity.kt b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodManagementActivity.kt index c9fe267414..43f4046a5e 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodManagementActivity.kt +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/PodManagementActivity.kt @@ -59,11 +59,11 @@ class PodManagementActivity : NoSplashAppCompatActivity() { } initpod_remove_pod.setOnClickListener { - removePodAction() + deactivatePodAction() } initpod_reset_pod.setOnClickListener { - resetPodAction() + discardPodAction() } initpod_pod_history.setOnClickListener { @@ -93,7 +93,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() { private fun initPodAction() { val pagerSettings = WizardPagerSettings() - var refreshAction = InitPodRefreshAction(injector, PodActionType.InitPod) + var refreshAction = InitPodRefreshAction(injector, PodActionType.INIT_POD) pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext) pagerSettings.setFinishStringResourceId(R.string.close) @@ -119,9 +119,9 @@ class PodManagementActivity : NoSplashAppCompatActivity() { this@PodManagementActivity.startActivity(myIntent) } - private fun removePodAction() { + private fun deactivatePodAction() { val pagerSettings = WizardPagerSettings() - var refreshAction = InitPodRefreshAction(injector, PodActionType.RemovePod) + var refreshAction = InitPodRefreshAction(injector, PodActionType.DEACTIVATE_POD) pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext) pagerSettings.setFinishStringResourceId(R.string.close) @@ -143,10 +143,10 @@ class PodManagementActivity : NoSplashAppCompatActivity() { } - private fun resetPodAction() { + private fun discardPodAction() { OKDialog.showConfirmation(this, - resourceHelper.gs(R.string.omnipod_cmd_reset_pod_desc), Thread { - aapsOmnipodManager.resetPodStatus() + resourceHelper.gs(R.string.omnipod_cmd_discard_pod_desc), Thread { + aapsOmnipodManager.discardPodState() rxBus.send(EventOmnipodPumpValuesChanged()) }) } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/defs/PodActionType.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/defs/PodActionType.java index 20daef9874..48380638c2 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/defs/PodActionType.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/defs/PodActionType.java @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.defs; public enum PodActionType { - InitPod, - RemovePod, - ResetPod + INIT_POD, + DEACTIVATE_POD, + DISCARD_POD } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitActionFragment.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitActionFragment.java index 97dd6c2573..e05c86ec5b 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitActionFragment.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitActionFragment.java @@ -118,9 +118,9 @@ public class InitActionFragment extends DaggerFragment implements PodInitReceive mapCheckBoxes.put(child, checkBox1); } - if (podInitActionType == PodInitActionType.FillCannulaSetBasalProfileWizardStep) { + if (podInitActionType == PodInitActionType.FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP) { headerView.setText(R.string.omnipod_init_pod_wizard_step4_action_header); - } else if (podInitActionType == PodInitActionType.DeactivatePodWizardStep) { + } else if (podInitActionType == PodInitActionType.DEACTIVATE_POD_WIZARD_STEP) { headerView.setText(R.string.omnipod_remove_pod_wizard_step2_action_header); } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitPodTask.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitPodTask.java index 6864c696a1..12742ff108 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitPodTask.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/initpod/InitPodTask.java @@ -37,18 +37,18 @@ public class InitPodTask extends AsyncTask { @Override protected String doInBackground(Void... params) { - if (initActionFragment.podInitActionType == PodInitActionType.PairAndPrimeWizardStep) { + if (initActionFragment.podInitActionType == PodInitActionType.PAIR_AND_PRIME_WIZARD_STEP) { initActionFragment.callResult = aapsOmnipodManager.pairAndPrime( initActionFragment.podInitActionType, initActionFragment ); - } else if (initActionFragment.podInitActionType == PodInitActionType.FillCannulaSetBasalProfileWizardStep) { + } else if (initActionFragment.podInitActionType == PodInitActionType.FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP) { initActionFragment.callResult = aapsOmnipodManager.setInitialBasalScheduleAndInsertCannula( initActionFragment.podInitActionType, initActionFragment, profileFunction.getProfile() ); - } else if (initActionFragment.podInitActionType == PodInitActionType.DeactivatePodWizardStep) { + } else if (initActionFragment.podInitActionType == PodInitActionType.DEACTIVATE_POD_WIZARD_STEP) { initActionFragment.callResult = aapsOmnipodManager.deactivatePod(initActionFragment); } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/FullInitPodWizardModel.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/FullInitPodWizardModel.java index 6cc58263ea..af364324ae 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/FullInitPodWizardModel.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/FullInitPodWizardModel.java @@ -31,7 +31,7 @@ public class FullInitPodWizardModel extends InitPodWizardModel { new InitActionPage(this, R.string.omnipod_init_pod_wizard_step2_title, - PodInitActionType.PairAndPrimeWizardStep + PodInitActionType.PAIR_AND_PRIME_WIZARD_STEP ).setRequired(true).setCancelReason("Cancel"), new DisplayTextPage(this, @@ -41,7 +41,7 @@ public class FullInitPodWizardModel extends InitPodWizardModel { new InitActionPage(this, R.string.omnipod_init_pod_wizard_step4_title, - PodInitActionType.FillCannulaSetBasalProfileWizardStep + PodInitActionType.FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP ).setRequired(true).setCancelReason("Cancel") ); } diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/RemovePodWizardModel.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/RemovePodWizardModel.java index 51ebe065aa..381dcb1950 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/RemovePodWizardModel.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/RemovePodWizardModel.java @@ -48,7 +48,7 @@ public class RemovePodWizardModel extends AbstractWizardModel { new RemovePodActionPage(this, R.string.omnipod_remove_pod_wizard_step2_title, - PodInitActionType.DeactivatePodWizardStep + PodInitActionType.DEACTIVATE_POD_WIZARD_STEP ).setRequired(true).setCancelReason("Cancel") ); diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/ShortInitPodWizardModel.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/ShortInitPodWizardModel.java index ce82893eee..3813520e80 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/ShortInitPodWizardModel.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/model/ShortInitPodWizardModel.java @@ -31,7 +31,7 @@ public class ShortInitPodWizardModel extends InitPodWizardModel { new InitActionPage(this, R.string.omnipod_init_pod_wizard_step4_title, - PodInitActionType.FillCannulaSetBasalProfileWizardStep + PodInitActionType.FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP ).setRequired(true).setCancelReason("Cancel") ); diff --git a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/pages/InitPodRefreshAction.java b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/pages/InitPodRefreshAction.java index b78ebaae3e..6949710a67 100644 --- a/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/pages/InitPodRefreshAction.java +++ b/omnipod/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/ui/wizard/pages/InitPodRefreshAction.java @@ -48,7 +48,7 @@ public class InitPodRefreshAction extends AbstractCancelAction implements Finish @Override public void execute() { - if (actionType == PodActionType.InitPod) { + if (actionType == PodActionType.INIT_POD) { if (podStateManager.isPodRunning()) { uploadCareportalEvent(System.currentTimeMillis(), CareportalEvent.SITECHANGE); } diff --git a/omnipod/src/main/res/drawable/ic_loop_disabled.xml b/omnipod/src/main/res/drawable/ic_loop_disabled.xml new file mode 100644 index 0000000000..ed79c96429 --- /dev/null +++ b/omnipod/src/main/res/drawable/ic_loop_disabled.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/omnipod/src/main/res/layout/omnipod_fragment.xml b/omnipod/src/main/res/layout/omnipod_fragment.xml index 853ce22c97..6f9e9755a7 100644 --- a/omnipod/src/main/res/layout/omnipod_fragment.xml +++ b/omnipod/src/main/res/layout/omnipod_fragment.xml @@ -715,7 +715,7 @@ android:orientation="horizontal">