From b5c46e3bcf00e015626e707bce8d523556b35629 Mon Sep 17 00:00:00 2001 From: Bart Sopers Date: Sun, 16 Aug 2020 23:54:41 +0200 Subject: [PATCH] WIP on moving Omnipod to a separate module --- app/build.gradle | 8 +- app/src/main/AndroidManifest.xml | 11 -- .../dependencyInjection/FragmentsModule.kt | 2 +- .../dependencyInjection/OmnipodModule.kt | 30 +-- .../dependencyInjection/PluginsModule.kt | 2 +- .../dependencyInjection/ServicesModule.kt | 2 +- app/src/main/res/values/strings.xml | 178 +----------------- app/src/main/res/values/styles.xml | 31 --- omnipod/.gitignore | 1 + omnipod/build.gradle | 100 ++++++++++ omnipod/consumer-rules.pro | 0 ...ware.android.library.wizardpager-1.1.4.aar | Bin 0 -> 97170 bytes omnipod/proguard-rules.pro | 21 +++ omnipod/src/main/AndroidManifest.xml | 16 ++ .../plugins/pump/omnipod/OmnipodFragment.kt | 0 .../pump/omnipod/OmnipodPumpPlugin.java | 0 .../comm/OmnipodCommunicationManager.java | 0 .../pump/omnipod/comm/OmnipodManager.java | 0 .../pump/omnipod/comm/SetupActionResult.java | 0 .../comm/action/AcknowledgeAlertsAction.java | 0 .../comm/action/AssignAddressAction.java | 0 .../pump/omnipod/comm/action/BolusAction.java | 0 .../comm/action/CancelDeliveryAction.java | 0 .../comm/action/ConfigureAlertsAction.java | 0 .../comm/action/DeactivatePodAction.java | 0 .../omnipod/comm/action/GetPodInfoAction.java | 0 .../omnipod/comm/action/GetStatusAction.java | 0 .../comm/action/InsertCannulaAction.java | 0 .../omnipod/comm/action/OmnipodAction.java | 0 .../pump/omnipod/comm/action/PrimeAction.java | 0 .../comm/action/SetBasalScheduleAction.java | 0 .../comm/action/SetTempBasalAction.java | 0 .../omnipod/comm/action/SetupPodAction.java | 0 .../action/service/InsertCannulaService.java | 0 .../comm/action/service/PrimeService.java | 0 .../ActionInitializationException.java | 0 .../CommandInitializationException.java | 0 .../exception/CommunicationException.java | 0 .../comm/exception/CrcMismatchException.java | 0 .../IllegalDeliveryStatusException.java | 1 - .../IllegalMessageAddressException.java | 0 ...IllegalMessageSequenceNumberException.java | 0 .../exception/IllegalPacketTypeException.java | 0 .../IllegalPodProgressException.java | 0 .../exception/IllegalResponseException.java | 0 .../IllegalVersionResponseTypeException.java | 0 .../exception/MessageDecodingException.java | 0 .../exception/NonceOutOfSyncException.java | 0 .../comm/exception/NonceResyncException.java | 0 .../exception/NotEnoughDataException.java | 0 .../comm/exception/PodFaultException.java | 0 .../PodReturnedErrorResponseException.java | 0 .../comm/message/IRawRepresentable.java | 0 .../omnipod/comm/message/MessageBlock.java | 0 .../message/NonceResyncableMessageBlock.java | 0 .../omnipod/comm/message/OmnipodMessage.java | 0 .../omnipod/comm/message/OmnipodPacket.java | 0 .../command/AcknowledgeAlertsCommand.java | 0 .../message/command/AssignAddressCommand.java | 0 .../command/BasalScheduleExtraCommand.java | 0 .../message/command/BeepConfigCommand.java | 0 .../message/command/BolusExtraCommand.java | 0 .../command/CancelDeliveryCommand.java | 0 .../command/ConfigureAlertsCommand.java | 0 .../message/command/DeactivatePodCommand.java | 0 .../message/command/FaultConfigCommand.java | 0 .../message/command/GetStatusCommand.java | 0 .../command/SetInsulinScheduleCommand.java | 0 .../comm/message/command/SetupPodCommand.java | 0 .../command/TempBasalExtraCommand.java | 0 .../comm/message/response/ErrorResponse.java | 0 .../comm/message/response/StatusResponse.java | 0 .../message/response/VersionResponse.java | 0 .../message/response/podinfo/PodInfo.java | 0 .../response/podinfo/PodInfoActiveAlerts.java | 0 .../response/podinfo/PodInfoDataLog.java | 0 .../PodInfoFaultAndInitializationTime.java | 0 .../response/podinfo/PodInfoFaultEvent.java | 0 .../podinfo/PodInfoOlderPulseLog.java | 0 .../podinfo/PodInfoRecentPulseLog.java | 0 .../response/podinfo/PodInfoResponse.java | 0 .../omnipod/data/RLHistoryItemOmnipod.java | 6 +- .../pump/omnipod/defs/AlertConfiguration.java | 0 .../defs/AlertConfigurationFactory.java | 0 .../plugins/pump/omnipod/defs/AlertSet.java | 0 .../plugins/pump/omnipod/defs/AlertSlot.java | 0 .../pump/omnipod/defs/AlertTrigger.java | 0 .../plugins/pump/omnipod/defs/AlertType.java | 0 .../pump/omnipod/defs/BeepConfigType.java | 0 .../plugins/pump/omnipod/defs/BeepRepeat.java | 0 .../plugins/pump/omnipod/defs/BeepType.java | 0 .../pump/omnipod/defs/DeliveryStatus.java | 0 .../pump/omnipod/defs/DeliveryType.java | 0 .../pump/omnipod/defs/FaultEventCode.java | 0 .../pump/omnipod/defs/FirmwareVersion.java | 0 .../pump/omnipod/defs/IOmnipodManager.java | 0 .../pump/omnipod/defs/LogEventErrorCode.java | 0 .../pump/omnipod/defs/MessageBlockType.java | 0 .../plugins/pump/omnipod/defs/NonceState.java | 0 .../pump/omnipod/defs/OmnipodCommandType.java | 0 .../omnipod/defs/OmnipodCustomActionType.java | 0 .../defs/OmnipodPumpPluginInterface.java | 0 .../omnipod/defs/OmnipodStatusRequest.java | 0 .../omnipod/defs/OmnipodUIResponseType.java | 0 .../plugins/pump/omnipod/defs/PacketType.java | 0 .../pump/omnipod/defs/PodInfoType.java | 0 .../pump/omnipod/defs/PodInitActionType.java | 0 .../pump/omnipod/defs/PodInitReceiver.java | 0 .../pump/omnipod/defs/PodProgressStatus.java | 0 .../pump/omnipod/defs/PodResponseType.java | 0 .../pump/omnipod/defs/TimerAlertTrigger.java | 0 .../defs/UnitsRemainingAlertTrigger.java | 0 .../defs/schedule/BasalDeliverySchedule.java | 0 .../defs/schedule/BasalDeliveryTable.java | 0 .../omnipod/defs/schedule/BasalSchedule.java | 0 .../defs/schedule/BasalScheduleEntry.java | 0 .../defs/schedule/BasalTableEntry.java | 0 .../defs/schedule/BolusDeliverySchedule.java | 0 .../defs/schedule/DeliverySchedule.java | 0 .../defs/schedule/InsulinScheduleType.java | 0 .../pump/omnipod/defs/schedule/RateEntry.java | 0 .../schedule/TempBasalDeliverySchedule.java | 0 .../omnipod/defs/state/PodStateManager.java | 0 .../omnipod/dialogs/PodHistoryActivity.java | 0 .../omnipod/dialogs/PodManagementActivity.kt | 0 .../dialogs/wizard/defs/PodActionType.java | 0 .../wizard/initpod/InitActionFragment.java | 0 .../wizard/initpod/InitActionPage.java | 0 .../dialogs/wizard/initpod/InitPodTask.java | 0 .../wizard/model/FullInitPodWizardModel.java | 0 .../wizard/model/InitPodWizardModel.java | 0 .../wizard/model/RemovePodWizardModel.java | 0 .../wizard/model/ShortInitPodWizardModel.java | 0 .../wizard/pages/InitPodRefreshAction.java | 0 .../dialogs/wizard/pages/PodInfoFragment.java | 0 .../dialogs/wizard/pages/PodInfoPage.java | 0 .../removepod/RemoveActionFragment.java | 4 +- .../wizard/removepod/RemovePodActionPage.java | 0 .../omnipod/driver/OmnipodDriverState.java | 0 .../omnipod/driver/OmnipodPumpStatus.java | 0 .../driver/comm/AapsOmnipodManager.java | 0 .../driver/comm/AapsPodStateManager.java | 0 .../pump/omnipod/driver/db/PodHistory.java | 0 .../driver/db/PodHistoryEntryType.java | 0 .../pump/omnipod/driver/ui/OmnipodUIComm.java | 0 .../driver/ui/OmnipodUIPostprocessor.java | 0 .../pump/omnipod/driver/ui/OmnipodUITask.java | 0 .../EventOmnipodAcknowledgeAlertsChanged.kt | 0 .../events/EventOmnipodPumpValuesChanged.kt | 0 .../events/EventOmnipodRefreshButtonState.kt | 0 .../omnipod/exception/OmnipodException.java | 0 .../service/RileyLinkOmnipodService.java | 0 .../plugins/pump/omnipod/util/OmniCRC.java | 0 .../pump/omnipod/util/OmnipodConst.java | 0 .../pump/omnipod/util/OmnipodUtil.java | 0 .../src/main/res/layout/omnipod_fragment.xml | 0 .../src/main/res/layout/omnipod_initpod.xml | 0 .../layout/omnipod_initpod_init_action.xml | 0 .../res/layout/omnipod_initpod_pod_info.xml | 0 .../layout/omnipod_initpod_pod_info_item.xml | 0 .../layout/omnipod_pod_history_activity.xml | 0 .../res/layout/omnipod_pod_history_item.xml | 0 .../src/main/res/layout/omnipod_pod_mgmt.xml | 0 omnipod/src/main/res/values/strings.xml | 159 ++++++++++++++++ omnipod/src/main/res/values/styles.xml | 30 +++ .../src/main/res/xml/pref_omnipod.xml | 0 .../command/AcknowledgeAlertsCommandTest.java | 0 .../command/AssignAddressCommandTest.java | 0 .../BasalScheduleExtraCommandTest.java | 0 .../command/BeepConfigCommandTest.java | 0 .../command/BolusExtraCommandTest.java | 0 .../command/CancelDeliveryCommandTest.java | 0 .../command/ConfigureAlertsCommandTest.java | 0 .../command/DeactivatePodCommandTest.java | 0 .../command/FaultConfigCommandTest.java | 0 .../message/command/GetStatusCommandTest.java | 0 .../SetInsulinScheduleCommandTest.java | 0 .../message/command/SetupPodCommandTest.java | 0 .../command/TempBasalExtraCommandTest.java | 0 .../defs/schedule/BasalTableEntryTest.java | 0 .../message/response/ErrorResponseTest.java | 0 .../message/response/StatusResponseTest.java | 0 .../message/response/VersionResponseTest.java | 0 .../podinfo/PodInfoActiveAlertsTest.java | 0 .../response/podinfo/PodInfoDataLogTest.java | 0 ...PodInfoFaultAndInitializationTimeTest.java | 11 +- .../podinfo/PodInfoFaultEventTest.java | 0 .../podinfo/PodInfoOlderPulseLogTest.java | 0 .../podinfo/PodInfoRecentPulseLogTest.java | 0 .../response/podinfo/PodInfoResponseTest.java | 0 .../defs/state/AapsPodStateManagerTest.java | 0 .../driver/comm/AapsOmnipodManagerTest.java | 42 ++--- settings.gradle | 1 + 193 files changed, 389 insertions(+), 267 deletions(-) create mode 100644 omnipod/.gitignore create mode 100644 omnipod/build.gradle create mode 100644 omnipod/consumer-rules.pro create mode 100644 omnipod/libs/com.atech-software.android.library.wizardpager-1.1.4.aar create mode 100644 omnipod/proguard-rules.pro create mode 100644 omnipod/src/main/AndroidManifest.xml rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodFragment.kt (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodCommunicationManager.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodManager.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/SetupActionResult.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/AcknowledgeAlertsAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/AssignAddressAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/BolusAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/CancelDeliveryAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/ConfigureAlertsAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/DeactivatePodAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/GetPodInfoAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/GetStatusAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/InsertCannulaAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/OmnipodAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/PrimeAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/SetBasalScheduleAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/SetTempBasalAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/SetupPodAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/service/InsertCannulaService.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/action/service/PrimeService.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/ActionInitializationException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/CommandInitializationException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/CommunicationException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/CrcMismatchException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/IllegalDeliveryStatusException.java (91%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/IllegalMessageAddressException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/IllegalMessageSequenceNumberException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/IllegalPacketTypeException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/IllegalPodProgressException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/IllegalResponseException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/IllegalVersionResponseTypeException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/MessageDecodingException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/NonceOutOfSyncException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/NonceResyncException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/NotEnoughDataException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/PodFaultException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/exception/PodReturnedErrorResponseException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/IRawRepresentable.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/MessageBlock.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/NonceResyncableMessageBlock.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/OmnipodMessage.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/OmnipodPacket.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AcknowledgeAlertsCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AssignAddressCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BasalScheduleExtraCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BeepConfigCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BolusExtraCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/CancelDeliveryCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/ConfigureAlertsCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/DeactivatePodCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/FaultConfigCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/GetStatusCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetInsulinScheduleCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetupPodCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/TempBasalExtraCommand.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/ErrorResponse.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponse.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/VersionResponse.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfo.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoActiveAlerts.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoDataLog.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTime.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultEvent.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoOlderPulseLog.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoRecentPulseLog.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoResponse.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/data/RLHistoryItemOmnipod.java (89%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/AlertConfiguration.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/AlertConfigurationFactory.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/AlertSet.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/AlertSlot.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/AlertTrigger.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/AlertType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/BeepConfigType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/BeepRepeat.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/BeepType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/DeliveryStatus.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/DeliveryType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/FaultEventCode.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/FirmwareVersion.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/IOmnipodManager.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/LogEventErrorCode.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/MessageBlockType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/NonceState.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodCommandType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodCustomActionType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodPumpPluginInterface.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodStatusRequest.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/OmnipodUIResponseType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/PacketType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/PodInfoType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/PodInitActionType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/PodInitReceiver.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/PodProgressStatus.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/PodResponseType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/TimerAlertTrigger.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/UnitsRemainingAlertTrigger.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/BasalDeliverySchedule.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/BasalDeliveryTable.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/BasalSchedule.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/BasalScheduleEntry.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/BasalTableEntry.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/BolusDeliverySchedule.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/DeliverySchedule.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/InsulinScheduleType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/RateEntry.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/schedule/TempBasalDeliverySchedule.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/PodStateManager.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/PodHistoryActivity.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/PodManagementActivity.kt (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/defs/PodActionType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionFragment.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionPage.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitPodTask.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/model/FullInitPodWizardModel.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/model/InitPodWizardModel.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/model/RemovePodWizardModel.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/model/ShortInitPodWizardModel.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/pages/InitPodRefreshAction.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/pages/PodInfoFragment.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/pages/PodInfoPage.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/removepod/RemoveActionFragment.java (92%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/removepod/RemovePodActionPage.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/OmnipodDriverState.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/OmnipodPumpStatus.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsPodStateManager.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/db/PodHistory.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/db/PodHistoryEntryType.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/ui/OmnipodUIComm.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/ui/OmnipodUIPostprocessor.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/ui/OmnipodUITask.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/events/EventOmnipodAcknowledgeAlertsChanged.kt (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/events/EventOmnipodPumpValuesChanged.kt (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/events/EventOmnipodRefreshButtonState.kt (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/exception/OmnipodException.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/service/RileyLinkOmnipodService.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/util/OmniCRC.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/util/OmnipodConst.java (100%) rename {app => omnipod}/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/util/OmnipodUtil.java (100%) rename {app => omnipod}/src/main/res/layout/omnipod_fragment.xml (100%) rename {app => omnipod}/src/main/res/layout/omnipod_initpod.xml (100%) rename {app => omnipod}/src/main/res/layout/omnipod_initpod_init_action.xml (100%) rename {app => omnipod}/src/main/res/layout/omnipod_initpod_pod_info.xml (100%) rename {app => omnipod}/src/main/res/layout/omnipod_initpod_pod_info_item.xml (100%) rename {app => omnipod}/src/main/res/layout/omnipod_pod_history_activity.xml (100%) rename {app => omnipod}/src/main/res/layout/omnipod_pod_history_item.xml (100%) rename {app => omnipod}/src/main/res/layout/omnipod_pod_mgmt.xml (100%) create mode 100644 omnipod/src/main/res/values/strings.xml create mode 100644 omnipod/src/main/res/values/styles.xml rename {app => omnipod}/src/main/res/xml/pref_omnipod.xml (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AcknowledgeAlertsCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AssignAddressCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BasalScheduleExtraCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BeepConfigCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BolusExtraCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/CancelDeliveryCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/ConfigureAlertsCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/DeactivatePodCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/FaultConfigCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/GetStatusCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetInsulinScheduleCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetupPodCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/TempBasalExtraCommandTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/defs/schedule/BasalTableEntryTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/ErrorResponseTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/VersionResponseTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoActiveAlertsTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoDataLogTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java (77%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultEventTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoOlderPulseLogTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoRecentPulseLogTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoResponseTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/AapsPodStateManagerTest.java (100%) rename {app => omnipod}/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManagerTest.java (71%) diff --git a/app/build.gradle b/app/build.gradle index 4b4aaa1876..1ba6eed95e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -134,11 +134,6 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" // if you change minSdkVersion to less than 11, you need to change executeTask for wear - // 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.6.7-dev"' - buildConfigField "String", "DEV_VERSION_COMMIT", '"65c8cc98804cfc366239ad2bedb2dd98e3e4f3c2"' - buildConfigField "String", "DEV_VERSION_COMMIT_DATE", '"16.8.2020"' // 16th of August - ndk { moduleName "BleCommandUtil" } @@ -250,6 +245,7 @@ dependencies { implementation project(':danar') implementation project(':rileylink') implementation project(':medtronic') + implementation project(':omnipod') implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.google.android.gms:play-services-wearable:17.0.0' @@ -285,8 +281,6 @@ dependencies { implementation "com.jjoe64:graphview:4.0.1" implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2" implementation 'com.madgag.spongycastle:core:1.58.0.0' - // Omnipod wizard - implementation(name: "com.atech-software.android.library.wizardpager-1.1.4", ext: "aar") implementation("com.google.android:flexbox:0.3.0") { exclude group: "com.android.support" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8f3db8e179..531e88e83a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -263,17 +263,6 @@ - - - - - - - diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt index cde5137ac9..cf9f7577fc 100644 --- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt @@ -66,7 +66,7 @@ abstract class FragmentsModule { @ContributesAndroidInjector abstract fun contributesLoopFragment(): LoopFragment @ContributesAndroidInjector abstract fun contributesMaintenanceFragment(): MaintenanceFragment @ContributesAndroidInjector abstract fun contributesMedtronicFragment(): MedtronicFragment - @ContributesAndroidInjector abstract fun contributesOmnipodFragment(): OmnipodFragment + @ContributesAndroidInjector abstract fun contributesOmnipodFragment(): info.nightscout.androidaps.plugins.pump.omnipod.OmnipodFragment @ContributesAndroidInjector abstract fun contributesNSProfileFragment(): NSProfileFragment @ContributesAndroidInjector abstract fun contributesNSClientFragment(): NSClientFragment @ContributesAndroidInjector abstract fun contributesSmsCommunicatorFragment(): SmsCommunicatorFragment 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 0e73cea942..400d38d403 100644 --- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/OmnipodModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/OmnipodModule.kt @@ -30,31 +30,31 @@ abstract class OmnipodModule { // Activities @ContributesAndroidInjector - abstract fun contributesPodManagementActivity(): PodManagementActivity - @ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): PodHistoryActivity + abstract fun contributesPodManagementActivity(): info.nightscout.androidaps.plugins.pump.omnipod.dialogs.PodManagementActivity + @ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): info.nightscout.androidaps.plugins.pump.omnipod.dialogs.PodHistoryActivity // Fragments - @ContributesAndroidInjector abstract fun initActionFragment(): InitActionFragment - @ContributesAndroidInjector abstract fun removeActionFragment(): RemoveActionFragment - @ContributesAndroidInjector abstract fun podInfoFragment(): PodInfoFragment + @ContributesAndroidInjector abstract fun initActionFragment(): info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.InitActionFragment + @ContributesAndroidInjector abstract fun removeActionFragment(): info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.removepod.RemoveActionFragment + @ContributesAndroidInjector abstract fun podInfoFragment(): info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.pages.PodInfoFragment // Service @ContributesAndroidInjector - abstract fun omnipodCommunicationManagerProvider(): OmnipodCommunicationManager - @ContributesAndroidInjector abstract fun aapsOmnipodManagerProvider(): AapsOmnipodManager + abstract fun omnipodCommunicationManagerProvider(): info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationManager + @ContributesAndroidInjector abstract fun aapsOmnipodManagerProvider(): info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager // Data - @ContributesAndroidInjector abstract fun omnipodUITaskProvider(): OmnipodUITask - @ContributesAndroidInjector abstract fun initPodRefreshAction(): InitPodRefreshAction - @ContributesAndroidInjector abstract fun podStateManager(): PodStateManager - @ContributesAndroidInjector abstract fun initPodTask(): InitPodTask - @ContributesAndroidInjector abstract fun omnipodPumpPlugin(): OmnipodPumpPlugin + @ContributesAndroidInjector abstract fun omnipodUITaskProvider(): info.nightscout.androidaps.plugins.pump.omnipod.driver.ui.OmnipodUITask + @ContributesAndroidInjector abstract fun initPodRefreshAction(): info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.pages.InitPodRefreshAction + @ContributesAndroidInjector abstract fun podStateManager(): info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodStateManager + @ContributesAndroidInjector abstract fun initPodTask(): info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.InitPodTask + @ContributesAndroidInjector abstract fun omnipodPumpPlugin(): info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin companion object { @Provides @Singleton - fun podStateManagerProvider(aapsLogger: AAPSLogger, sp: SP, omnipodPumpStatus: OmnipodPumpStatus, - rxBus: RxBusWrapper, resourceHelper: ResourceHelper, dateUtil: DateUtil): PodStateManager = - AapsPodStateManager(aapsLogger, sp, omnipodPumpStatus, rxBus, resourceHelper, dateUtil) + fun podStateManagerProvider(aapsLogger: AAPSLogger, sp: SP, omnipodPumpStatus: info.nightscout.androidaps.plugins.pump.omnipod.driver.OmnipodPumpStatus, + rxBus: RxBusWrapper, resourceHelper: ResourceHelper, dateUtil: DateUtil): info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodStateManager = + info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsPodStateManager(aapsLogger, sp, omnipodPumpStatus, rxBus, resourceHelper, dateUtil) } } diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/PluginsModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/PluginsModule.kt index 41c1615fe0..60faae9344 100644 --- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/PluginsModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/PluginsModule.kt @@ -344,7 +344,7 @@ abstract class PluginsModule { @PumpDriver @IntoMap @IntKey(490) - abstract fun bindOmnipodPumpPlugin(plugin: OmnipodPumpPlugin): PluginBase + abstract fun bindOmnipodPumpPlugin(plugin: info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin): PluginBase @Qualifier annotation class AllConfigs diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt index f961c3a863..d5cd6a6c34 100644 --- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt @@ -30,5 +30,5 @@ abstract class ServicesModule { @ContributesAndroidInjector abstract fun contributesInsightConnectionService(): InsightConnectionService @ContributesAndroidInjector abstract fun contributesRileyLinkService(): RileyLinkService @ContributesAndroidInjector abstract fun contributesRileyLinkMedtronicService(): RileyLinkMedtronicService - @ContributesAndroidInjector abstract fun contributesRileyLinkOmnipodService(): RileyLinkOmnipodService + @ContributesAndroidInjector abstract fun contributesRileyLinkOmnipodService(): info.nightscout.androidaps.plugins.pump.omnipod.service.RileyLinkOmnipodService } \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1daa8393b2..19d8c7966b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -744,7 +744,7 @@ Extended bolus delivery error Sight ago - enableSMB_always + enableSMB_always enableSMB_with_COB enableSMB_with_temptarget enableSMB_after_carbs @@ -915,18 +915,18 @@ Max daily safety multiplier Current basal safety multiplier n/a - virtualpump_type + virtualpump_type Virtual Pump Type Pump Definition Bolus: Step=%1$s\nExtended Bolus: [Step=%2$s, Duration=%3$smin-%4$sh]\nBasal: Step=%5$s\nTBR: %6$s (by %7$s), Duration=%8$smin-%9$sh\n%10$s Autobackfill BG Wizard Settings - wearwizard_bg - wearwizard_tt - wearwizard_trend - wearwizard_cob - wearwizard_bolusiob - wearwizard_basaliob + wearwizard_bg + wearwizard_tt + wearwizard_trend + wearwizard_cob + wearwizard_bolusiob + wearwizard_basaliob Calculations included in the Wizard result: Display Settings General Settings @@ -965,8 +965,8 @@ Poctech Receive BG values from Poctech app Receive BG values from Tomato app (MiaoMiao device) - high_temptarget_raises_sensitivity - low_temptarget_lowers_sensitivity + high_temptarget_raises_sensitivity + low_temptarget_lowers_sensitivity High temptarget raises sensitivity = 100]]> Low temptarget lowers sensitivity @@ -1397,7 +1397,6 @@ skin Skin - Never contacted Waking up @@ -1408,163 +1407,6 @@ Active Sleeping - - - - - Omnipod - POD - Pump integration for Omnipod, requires RileyLink (with at least 2.0 firmware) device. - - - pref_omnipod_beep_bolus_enabled - pref_omnipod_beep_basal_enabled - pref_omnipod_beep_smb_enabled - pref_omnipod_beep_tbr_enabled - pref_omnipod_pod_debugging_options_enabled - pref_omnipod_timechange_enabled - Bolus Beep Enabled - Basal Beep Enabled - SMB Beep Enabled - TBR Beep Enabled - Pod Debugging Options Enabled - DST/Timezone Detection Enabled - - - Now - Pod Mgmt - Pod Status - %1$.2f U left - Over 50 U - Pod Address - Pod Expires - Warning - No Pod connected - Pod setup in progress (Pod progress status: %1$s) - Pod not initialized - Pod Fault - Pod Fault: %1$s %2$s - Pod running (last delivery status: %1$s) - Active Pod Alerts - Ack Alerts - %1$.2f %2$s (%3$s) - Initializing - Active - Unknown - - - - Omnipod (433.91 MHz) - - - - RileyLink Address invalid. - Operation is not possible.\n\nYou need to configure Omnipod first, before you can use this operation. - Operation is not possible.\n\n You need to wait few minutes, until AAPS tries to set profile for first time. - Illegal PodInitActionType: %1$s - No active pod. - - Command verification failed. - An unexpected error occurred. Please report! (type: %1$s). - Communication failed: received invalid input parameters. - Communication failed: timeout. - Communication failed: an unexpected error occurred. Please report! - Communication failed: message integrity verification failed. - Communication failed: received an invalid packet from the Pod. - Communication failed: the Pod is in a wrong state. - Communication failed: received an invalid response from the Pod. - Communication failed: received a message with an invalid sequence number from the Pod. - Communication failed: received a message with an invalid address from the Pod. - Communication failed: failed to decode message from the Pod. - Communication failed: nonce resync failed. - Communication failed: nonce out of sync. - Communication failed: not enough data received from the Pod. - A Pod fault (%1$03d %2$s) has been detected. Please deactivate your Pod and start a new one. - Communication failed: the Pod returned an error response. - - - Pod Management - Init Pod - Deactivate Pod - Reset Pod - Pod History - - Set Bolus - Cancel Bolus - Set Temporary Basal - Cancel Temporary Basal (Internally by driver) - Cancel Temporary Basal (Forced by user) - Set Basal Schedule - Get Pod Status - Get Pod Info - Set Time - Configure Alerts - Acknowledge Alerts - Suspend Delivery - Resume Delivery - Unknown Entry - - %1$.1f U - %1$.1f U, CH=%2$.1f g - Rate: %1$.1f U, Duration: %2$d min - - If you press OK, the Pod state will be forcibly reset and you will not be able to communicate with the Pod anymore. Do this only if you can not communicate with the Pod anymore. If you can still communicate with the Pod, please use the Deactivate Pod option. - Pod History not available at the moment. - - Omnipod - Omnipod - Omnipod - - - Fill the Pod - \nFill the new Pod with enough insulin for 3 days.\n\nListen for two beeps from the Pod during the filling process. These indicate that the minimum amount of 85U has been inserted. Be sure to completely empty the fill syringe, even after hearing the two beeps.\n\nAfter filling the Pod, please press Next.\n\nNote: do not remove the Pod\'s needle cap at this time. - Priming - Trying to pair with the new Pod and prime it.\n\nWhen all items are checked, you can press Next.\n\nNote: please keep the Pod and the RileyLink a few inches apart at this time. - Attach the Pod - \nPrepare the infusion site. Remove the Pod\'s needle cap and adhesive backing and attach the Pod to the infusion site.\n\nIf the cannula sticks out, please press Cancel and discard your Pod.\n\nPress Next to insert the cannula and begin basal delivery. - Inserting cannula - Trying to set initial basal schedule and insert the cannula.\n\nWhen all items are checked, you can press Next. - - Pod Info - \nThe Pod is now active.\n\nYour basal schedule has been programmed and the cannula has been inserted.\n\nPlease verify that the cannula has been inserted correctly and replace your Pod if you feel hasn\'t. - - Deactivate Pod - \nPress Next to deactivate the Pod.\n\nNote: This will suspend all insulin delivery and deactivate the Pod. - Deactivating the Pod - Deactivating the Pod.\n\nWhen all items are checked, you can press Next.\n\nNote: If deactivating continuously fails, please press Cancel and use the Reset Pod option to forcibly reset the Pod state. - - Pod deactivated.\n\nPlease remove the Pod from your body and discard it. - - Pair Pod - Prime Pod - Fill Cannula - Set Basal Profile - Cancel Delivery - Deactivate Pod - - - - Omnipod Dash - DASH - Pump integration for Omnipod Dash. - Finish pairing reminder - Finish setup reminder - Pod will expire soon - Pod will expire soon - Shutdown is imminent - Low reservoir - Unknown alert - Setting basal profile might have failed. Delivery might be suspended! Please refresh Pod status. - Setting temp basal might have failed. If there was a temp basal already running, that may have been cancelled! Please refresh pod status. - Setting time might have failed. Delivery might be suspended! Please refresh Pod status. - Unable to verify whether the bolus succeeded. Please verify that your Pod is bolusing or cancel the bolus. - RL Stats - Pulse Log - LOT - TID - PM / PI version - Errors - Compare profiles Profile helper Default profile diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 29f4ef5bc7..7425a772b4 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -52,36 +52,5 @@ #ff0000 - - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_omnipod.xml b/omnipod/src/main/res/xml/pref_omnipod.xml similarity index 100% rename from app/src/main/res/xml/pref_omnipod.xml rename to omnipod/src/main/res/xml/pref_omnipod.xml diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AcknowledgeAlertsCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AcknowledgeAlertsCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AcknowledgeAlertsCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AcknowledgeAlertsCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AssignAddressCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AssignAddressCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AssignAddressCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/AssignAddressCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BasalScheduleExtraCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BasalScheduleExtraCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BasalScheduleExtraCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BasalScheduleExtraCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BeepConfigCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BeepConfigCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BeepConfigCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BeepConfigCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BolusExtraCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BolusExtraCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BolusExtraCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/BolusExtraCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/CancelDeliveryCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/CancelDeliveryCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/CancelDeliveryCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/CancelDeliveryCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/ConfigureAlertsCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/ConfigureAlertsCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/ConfigureAlertsCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/ConfigureAlertsCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/DeactivatePodCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/DeactivatePodCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/DeactivatePodCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/DeactivatePodCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/FaultConfigCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/FaultConfigCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/FaultConfigCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/FaultConfigCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/GetStatusCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/GetStatusCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/GetStatusCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/GetStatusCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetInsulinScheduleCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetInsulinScheduleCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetInsulinScheduleCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetInsulinScheduleCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetupPodCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetupPodCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetupPodCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/SetupPodCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/TempBasalExtraCommandTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/TempBasalExtraCommandTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/TempBasalExtraCommandTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/command/TempBasalExtraCommandTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/defs/schedule/BasalTableEntryTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/defs/schedule/BasalTableEntryTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/defs/schedule/BasalTableEntryTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/defs/schedule/BasalTableEntryTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/ErrorResponseTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/ErrorResponseTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/ErrorResponseTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/ErrorResponseTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/StatusResponseTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/VersionResponseTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/VersionResponseTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/VersionResponseTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/VersionResponseTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoActiveAlertsTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoActiveAlertsTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoActiveAlertsTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoActiveAlertsTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoDataLogTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoDataLogTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoDataLogTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoDataLogTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java similarity index 77% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java index a7baff4f06..2998dc4f83 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java +++ b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultAndInitializationTimeTest.java @@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.po import org.joda.time.DateTime; import org.joda.time.Duration; +import org.junit.Assert; import org.junit.Test; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; @@ -19,10 +20,10 @@ public class PodInfoFaultAndInitializationTimeTest { assertTrue(Duration.standardMinutes(1).isEqual(podInfoFaultAndInitializationTime.getTimeFaultEvent())); DateTime dateTime = podInfoFaultAndInitializationTime.getInitializationTime(); - assertEquals(2018, dateTime.getYear()); - assertEquals(9, dateTime.getMonthOfYear()); - assertEquals(25, dateTime.getDayOfMonth()); - assertEquals(23, dateTime.getHourOfDay()); - assertEquals(14, dateTime.getMinuteOfHour()); + Assert.assertEquals(2018, dateTime.getYear()); + Assert.assertEquals(9, dateTime.getMonthOfYear()); + Assert.assertEquals(25, dateTime.getDayOfMonth()); + Assert.assertEquals(23, dateTime.getHourOfDay()); + Assert.assertEquals(14, dateTime.getMinuteOfHour()); } } diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultEventTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultEventTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultEventTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoFaultEventTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoOlderPulseLogTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoOlderPulseLogTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoOlderPulseLogTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoOlderPulseLogTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoRecentPulseLogTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoRecentPulseLogTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoRecentPulseLogTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoRecentPulseLogTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoResponseTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoResponseTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoResponseTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/message/response/podinfo/PodInfoResponseTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/AapsPodStateManagerTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/AapsPodStateManagerTest.java similarity index 100% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/AapsPodStateManagerTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/defs/state/AapsPodStateManagerTest.java diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManagerTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManagerTest.java similarity index 71% rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManagerTest.java rename to omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManagerTest.java index 5def4c92d4..fcfd6c7d7a 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManagerTest.java +++ b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManagerTest.java @@ -21,21 +21,21 @@ public class AapsOmnipodManagerTest { @Test public void validProfile() { - Profile profile = mock(Profile.class); + Profile profile = Mockito.mock(Profile.class); - Profile.ProfileValue value1 = mock(Profile.ProfileValue.class); + Profile.ProfileValue value1 = Mockito.mock(Profile.ProfileValue.class); value1.timeAsSeconds = 0; value1.value = 0.5D; - Profile.ProfileValue value2 = mock(Profile.ProfileValue.class); + Profile.ProfileValue value2 = Mockito.mock(Profile.ProfileValue.class); value2.timeAsSeconds = 18000; value2.value = 1.0D; - Profile.ProfileValue value3 = mock(Profile.ProfileValue.class); + Profile.ProfileValue value3 = Mockito.mock(Profile.ProfileValue.class); value3.timeAsSeconds = 50400; value3.value = 3.05D; - when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ + PowerMockito.when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ value1, value2, value3 @@ -70,16 +70,16 @@ public class AapsOmnipodManagerTest { public void invalidProfileNullEntries() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Basal values can not be null"); - AapsOmnipodManager.mapProfileToBasalSchedule(mock(Profile.class)); + AapsOmnipodManager.mapProfileToBasalSchedule(Mockito.mock(Profile.class)); } @Test public void invalidProfileZeroEntries() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Entries can not be empty"); - Profile profile = mock(Profile.class); + Profile profile = Mockito.mock(Profile.class); - when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[0]); + PowerMockito.when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[0]); AapsOmnipodManager.mapProfileToBasalSchedule(profile); } @@ -89,13 +89,13 @@ public class AapsOmnipodManagerTest { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("First basal schedule entry should have 0 offset"); - Profile profile = mock(Profile.class); + Profile profile = Mockito.mock(Profile.class); - Profile.ProfileValue value = mock(Profile.ProfileValue.class); + Profile.ProfileValue value = Mockito.mock(Profile.ProfileValue.class); value.timeAsSeconds = 1800; value.value = 0.5D; - when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ + PowerMockito.when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ value, }); @@ -107,17 +107,17 @@ public class AapsOmnipodManagerTest { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Invalid start time"); - Profile profile = mock(Profile.class); + Profile profile = Mockito.mock(Profile.class); - Profile.ProfileValue value1 = mock(Profile.ProfileValue.class); + Profile.ProfileValue value1 = Mockito.mock(Profile.ProfileValue.class); value1.timeAsSeconds = 0; value1.value = 0.5D; - Profile.ProfileValue value2 = mock(Profile.ProfileValue.class); + Profile.ProfileValue value2 = Mockito.mock(Profile.ProfileValue.class); value2.timeAsSeconds = 86400; value2.value = 0.5D; - when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ + PowerMockito.when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ value1, value2 }); @@ -130,13 +130,13 @@ public class AapsOmnipodManagerTest { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Invalid start time"); - Profile profile = mock(Profile.class); + Profile profile = Mockito.mock(Profile.class); - Profile.ProfileValue value = mock(Profile.ProfileValue.class); + Profile.ProfileValue value = Mockito.mock(Profile.ProfileValue.class); value.timeAsSeconds = -1; value.value = 0.5D; - when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ + PowerMockito.when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ value, }); @@ -145,13 +145,13 @@ public class AapsOmnipodManagerTest { @Test public void roundsToSupportedPrecision() { - Profile profile = mock(Profile.class); + Profile profile = Mockito.mock(Profile.class); - Profile.ProfileValue value = mock(Profile.ProfileValue.class); + Profile.ProfileValue value = Mockito.mock(Profile.ProfileValue.class); value.timeAsSeconds = 0; value.value = 0.04D; - when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ + PowerMockito.when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[]{ value, }); diff --git a/settings.gradle b/settings.gradle index 19da851b52..f24d3e8922 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,3 @@ +include ':omnipod' include ':app', ':wear', ':core', ':dana', ':danar', ':danars', ':rileylink', ':medtronic'