WIP on moving Omnipod to a separate module

This commit is contained in:
Bart Sopers 2020-08-16 23:54:41 +02:00
parent 17a2afb4b1
commit b5c46e3bcf
193 changed files with 389 additions and 267 deletions

View file

@ -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"
}

View file

@ -263,17 +263,6 @@
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<!-- Omnipod service and activities -->
<service
android:name=".plugins.pump.omnipod.service.RileyLinkOmnipodService"
android:enabled="true"
android:exported="true" />
<activity android:name=".plugins.pump.omnipod.dialogs.PodManagementActivity" />
<activity android:name=".plugins.pump.omnipod.dialogs.PodHistoryActivity" />
<activity android:name="com.atech.android.library.wizardpager.WizardPagerActivity"
android:theme="@style/AppTheme.NoActionBar"/>
</application>
</manifest>

View file

@ -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

View file

@ -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)
}
}

View file

@ -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

View file

@ -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
}

View file

@ -744,7 +744,7 @@
<string name="extendedbolusdeliveryerror">Extended bolus delivery error</string>
<string name="insightpump_shortname">Sight</string>
<string name="ago">ago</string>
<string name="key_enableSMB_always" translatable="false">enableSMB_always</string>
<string name="key_enableSMB_always" translatable="false">enableSMB_always</string>
<string name="key_enableSMB_with_COB" translatable="false">enableSMB_with_COB</string>
<string name="key_enableSMB_with_temptarget" translatable="false">enableSMB_with_temptarget</string>
<string name="key_enableSMB_after_carbs" translatable="false">enableSMB_after_carbs</string>
@ -915,18 +915,18 @@
<string name="openapsama_max_daily_safety_multiplier">Max daily safety multiplier</string>
<string name="openapsama_current_basal_safety_multiplier">Current basal safety multiplier</string>
<string name="value_unavailable_short">n/a</string>
<string translatable="false" name="key_virtualpump_type">virtualpump_type</string>
<string name="key_virtualpump_type" translatable="false">virtualpump_type</string>
<string name="virtualpump_type">Virtual Pump Type</string>
<string name="virtualpump_definition">Pump Definition</string>
<string name="virtualpump_pump_def">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</string>
<string name="ns_autobackfill_title">Autobackfill BG</string>
<string name="wear_wizard_settings">Wizard Settings</string>
<string translatable="false" name="key_wearwizard_bg">wearwizard_bg</string>
<string translatable="false" name="key_wearwizard_tt">wearwizard_tt</string>
<string translatable="false" name="key_wearwizard_trend">wearwizard_trend</string>
<string translatable="false" name="key_wearwizard_cob">wearwizard_cob</string>
<string translatable="false" name="key_wearwizard_bolusiob">wearwizard_bolusiob</string>
<string translatable="false" name="key_wearwizard_basaliob">wearwizard_basaliob</string>
<string name="key_wearwizard_bg" translatable="false">wearwizard_bg</string>
<string name="key_wearwizard_tt" translatable="false">wearwizard_tt</string>
<string name="key_wearwizard_trend" translatable="false">wearwizard_trend</string>
<string name="key_wearwizard_cob" translatable="false">wearwizard_cob</string>
<string name="key_wearwizard_bolusiob" translatable="false">wearwizard_bolusiob</string>
<string name="key_wearwizard_basaliob" translatable="false">wearwizard_basaliob</string>
<string name="wear_wizard_settings_summary">Calculations included in the Wizard result:</string>
<string name="wear_display_settings">Display Settings</string>
<string name="wear_general_settings">General Settings</string>
@ -965,8 +965,8 @@
<string name="poctech">Poctech</string>
<string name="description_source_poctech">Receive BG values from Poctech app</string>
<string name="description_source_tomato">Receive BG values from Tomato app (MiaoMiao device)</string>
<string translatable="false" name="key_high_temptarget_raises_sensitivity">high_temptarget_raises_sensitivity</string>
<string translatable="false" name="key_low_temptarget_lowers_sensitivity">low_temptarget_lowers_sensitivity</string>
<string name="key_high_temptarget_raises_sensitivity" translatable="false">high_temptarget_raises_sensitivity</string>
<string name="key_low_temptarget_lowers_sensitivity" translatable="false">low_temptarget_lowers_sensitivity</string>
<string name="high_temptarget_raises_sensitivity_title">High temptarget raises sensitivity</string>
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Raise sensitivity for temptargets >= 100]]></string>
<string name="low_temptarget_lowers_sensitivity_title">Low temptarget lowers sensitivity</string>
@ -1397,7 +1397,6 @@
<string name="key_skin" translatable="false">skin</string>
<string name="skin">Skin</string>
<!-- MDT Pump Status - removed when PodDeviceState is removed -->
<string name="medtronic_pump_status_never_contacted">Never contacted</string>
<string name="medtronic_pump_status_waking_up">Waking up</string>
@ -1408,163 +1407,6 @@
<string name="medtronic_pump_status_active">Active</string>
<string name="medtronic_pump_status_sleeping">Sleeping</string>
<!-- Omnipod -->
<!-- Omnipod - Base -->
<string name="omnipod_name" translatable="false">Omnipod</string>
<string name="omnipod_name_short" translatable="false">POD</string>
<string name="description_pump_omnipod">Pump integration for Omnipod, requires RileyLink (with at least 2.0 firmware) device.</string>
<!-- Omnipod Configuration -->
<string name="key_omnipod_beep_bolus_enabled" translatable="false">pref_omnipod_beep_bolus_enabled</string>
<string name="key_omnipod_beep_basal_enabled" translatable="false">pref_omnipod_beep_basal_enabled</string>
<string name="key_omnipod_beep_smb_enabled" translatable="false">pref_omnipod_beep_smb_enabled</string>
<string name="key_omnipod_beep_tbr_enabled" translatable="false">pref_omnipod_beep_tbr_enabled</string>
<string name="key_omnipod_pod_debugging_options_enabled" translatable="false">pref_omnipod_pod_debugging_options_enabled</string>
<string name="key_omnipod_timechange_enabled" translatable="false">pref_omnipod_timechange_enabled</string>
<string name="omnipod_config_beep_bolus_enabled">Bolus Beep Enabled</string>
<string name="omnipod_config_beep_basal_enabled">Basal Beep Enabled</string>
<string name="omnipod_config_beep_smb_enabled">SMB Beep Enabled</string>
<string name="omnipod_config_beep_tbr_enabled">TBR Beep Enabled</string>
<string name="omnipod_config_pod_debugging_options_enabled">Pod Debugging Options Enabled</string>
<string name="omnipod_config_timechange_enabled">DST/Timezone Detection Enabled</string>
<!-- Omnipod - Fragment -->
<string name="omnipod_connected_now">Now</string>
<string name="omnipod_pod_mgmt">Pod Mgmt</string>
<string name="omnipod_pod_status">Pod Status</string>
<string name="omnipod_reservoir_left">%1$.2f U left</string>
<string name="omnipod_reservoir_over50">Over 50 U</string>
<string name="omnipod_pod_address">Pod Address</string>
<string name="omnipod_pod_expiry">Pod Expires</string>
<string name="omnipod_warning">Warning</string>
<string name="omnipod_pod_status_no_pod_connected">No Pod connected</string>
<string name="omnipod_pod_setup_in_progress">Pod setup in progress (Pod progress status: %1$s)</string>
<string name="omnipod_pod_status_not_initalized">Pod not initialized</string>
<string name="omnipod_pod_status_pod_fault">Pod Fault</string>
<string name="omnipod_pod_status_pod_fault_description">Pod Fault: %1$s %2$s</string>
<string name="omnipod_pod_status_pod_running">Pod running (last delivery status: %1$s)</string>
<string name="omnipod_pod_active_alerts">Active Pod Alerts</string>
<string name="omnipod_ack_short">Ack Alerts</string>
<string name="omnipod_last_bolus" translatable="false">%1$.2f %2$s (%3$s)</string>
<string name="omnipod_pod_status_initalizing">Initializing</string>
<string name="omnipod_pod_status_active">Active</string>
<string name="omnipod_pod_status_unknown">Unknown</string>
<!-- Omnipod - Dialogs -->
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
<!-- Omnipod - Error -->
<string name="omnipod_error_rileylink_address_invalid">RileyLink Address invalid.</string>
<string name="omnipod_error_operation_not_possible_no_configuration">Operation is not possible.\n\nYou need to configure Omnipod first, before you can use this operation.</string>
<string name="omnipod_error_operation_not_possible_no_profile">Operation is not possible.\n\n You need to wait few minutes, until AAPS tries to set profile for first time.</string>
<string name="omnipod_error_illegal_init_action_type">Illegal PodInitActionType: %1$s</string>
<string name="omnipod_error_pod_not_attached">No active pod.</string>
<string name="omnipod_driver_error_setup_action_verification_failed">Command verification failed.</string>
<string name="omnipod_driver_error_unexpected_exception_type">An unexpected error occurred. Please report! (type: %1$s).</string>
<string name="omnipod_driver_error_invalid_parameters">Communication failed: received invalid input parameters.</string>
<string name="omnipod_driver_error_communication_failed_timeout">Communication failed: timeout.</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Communication failed: an unexpected error occurred. Please report!</string>
<string name="omnipod_driver_error_crc_mismatch">Communication failed: message integrity verification failed.</string>
<string name="omnipod_driver_error_invalid_packet_type">Communication failed: received an invalid packet from the Pod.</string>
<string name="omnipod_driver_error_invalid_progress_state">Communication failed: the Pod is in a wrong state.</string>
<string name="omnipod_driver_error_invalid_response">Communication failed: received an invalid response from the Pod.</string>
<string name="omnipod_driver_error_invalid_message_sequence_number">Communication failed: received a message with an invalid sequence number from the Pod.</string>
<string name="omnipod_driver_error_invalid_message_address">Communication failed: received a message with an invalid address from the Pod.</string>
<string name="omnipod_driver_error_message_decoding_failed">Communication failed: failed to decode message from the Pod.</string>
<string name="omnipod_driver_error_nonce_resync_failed">Communication failed: nonce resync failed.</string>
<string name="omnipod_driver_error_nonce_out_of_sync">Communication failed: nonce out of sync.</string>
<string name="omnipod_driver_error_not_enough_data">Communication failed: not enough data received from the Pod.</string>
<string name="omnipod_driver_error_pod_fault">A Pod fault (%1$03d %2$s) has been detected. Please deactivate your Pod and start a new one.</string>
<string name="omnipod_driver_error_pod_returned_error_response">Communication failed: the Pod returned an error response.</string>
<!-- Omnipod - Pod Mgmt -->
<string name="omnipod_pod_mgmt_title">Pod Management</string>
<string name="omnipod_cmd_init_pod">Init Pod</string>
<string name="omnipod_cmd_deactivate_pod">Deactivate Pod</string>
<string name="omnipod_cmd_reset_pod">Reset Pod</string>
<string name="omnipod_cmd_pod_history">Pod History</string>
<string name="omnipod_cmd_set_bolus">Set Bolus</string>
<string name="omnipod_cmd_cancel_bolus">Cancel Bolus</string>
<string name="omnipod_cmd_set_tbr">Set Temporary Basal</string>
<string name="omnipod_cmd_cancel_tbr">Cancel Temporary Basal (Internally by driver)</string>
<string name="omnipod_cmd_cancel_tbr_forced">Cancel Temporary Basal (Forced by user)</string>
<string name="omnipod_cmd_set_basal_schedule">Set Basal Schedule</string>
<string name="omnipod_cmd_get_pod_status">Get Pod Status</string>
<string name="omnipod_cmd_get_pod_info">Get Pod Info</string>
<string name="omnipod_cmd_set_time">Set Time</string>
<string name="omnipod_cmd_configure_alerts">Configure Alerts</string>
<string name="omnipod_cmd_acknowledge_alerts">Acknowledge Alerts</string>
<string name="omnipod_cmd_suspend_delivery">Suspend Delivery</string>
<string name="omnipod_cmd_resume_delivery">Resume Delivery</string>
<string name="omnipod_cmd_unknown_entry">Unknown Entry</string>
<string name="omnipod_cmd_bolus_value">%1$.1f U</string>
<string name="omnipod_cmd_bolus_value_with_carbs">%1$.1f U, CH=%2$.1f g</string>
<string name="omnipod_cmd_tbr_value">Rate: %1$.1f U, Duration: %2$d min</string>
<string name="omnipod_cmd_reset_pod_desc">If you press <b>OK</b>, 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 <b>Deactivate Pod</b> option.</string>
<string name="omnipod_cmd_pod_history_na">Pod History not available at the moment.</string>
<string name="omnipod_namex" translatable="false">Omnipod</string>
<string name="omnipod_namex2" translatable="false">Omnipod</string>
<string name="omnipod_namexxx" translatable="false">Omnipod</string>
<string name="omnipod_init_pod_wizard_step1_title">Fill the Pod</string>
<string name="omnipod_init_pod_wizard_step1_desc">\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 <b>Next</b>.\n\n<b>Note:</b> do not remove the Pod\'s needle cap at this time.</string>
<string name="omnipod_init_pod_wizard_step2_title">Priming</string>
<string name="omnipod_init_pod_wizard_step2_action_header">Trying to pair with the new Pod and prime it.\n\nWhen all items are checked, you can press <b>Next</b>.\n\n<b>Note:</b> please keep the Pod and the RileyLink a few inches apart at this time.</string>
<string name="omnipod_init_pod_wizard_step3_title">Attach the Pod</string>
<string name="omnipod_init_pod_wizard_step3_desc">\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 <b>Cancel</b> and discard your Pod.\n\nPress <b>Next</b> to insert the cannula and begin basal delivery.</string>
<string name="omnipod_init_pod_wizard_step4_title">Inserting cannula</string>
<string name="omnipod_init_pod_wizard_step4_action_header">Trying to set initial basal schedule and insert the cannula.\n\nWhen all items are checked, you can press <b>Next</b>.</string>
<string name="omnipod_init_pod_wizard_pod_info_title">Pod Info</string>
<string name="omnipod_init_pod_wizard_pod_info_init_pod_description">\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.</string>
<string name="omnipod_remove_pod_wizard_step1_title">Deactivate Pod</string>
<string name="omnipod_remove_pod_wizard_step1_desc">\nPress <b>Next</b> to deactivate the Pod.\n\n<b>Note:</b> This will suspend all insulin delivery and deactivate the Pod.</string>
<string name="omnipod_remove_pod_wizard_step2_title">Deactivating the Pod</string>
<string name="omnipod_remove_pod_wizard_step2_action_header">Deactivating the Pod.\n\nWhen all items are checked, you can press <b>Next</b>.\n\n<b>Note:</b> If deactivating continuously fails, please press <b>Cancel</b> and use the <b>Reset Pod</b> option to forcibly reset the Pod state.</string>
<string name="omnipod_init_pod_wizard_pod_info_remove_pod_description">Pod deactivated.\n\nPlease remove the Pod from your body and discard it.</string>
<string name="omnipod_init_pod_pair_pod">Pair Pod</string>
<string name="omnipod_init_pod_prime_pod">Prime Pod</string>
<string name="omnipod_init_pod_fill_cannula">Fill Cannula</string>
<string name="omnipod_init_pod_set_basal_profile">Set Basal Profile</string>
<string name="omnipod_deactivate_pod_cancel_delivery">Cancel Delivery</string>
<string name="omnipod_deactivate_pod_deactivate_pod">Deactivate Pod</string>
<!-- Omnipod - Base -->
<string name="omnipod_dash_name" translatable="false">Omnipod Dash</string>
<string name="omnipod_dash_name_short" translatable="false">DASH</string>
<string name="description_pump_omnipod_dash">Pump integration for Omnipod Dash.</string>
<string name="omnipod_alert_finish_pairing_reminder">Finish pairing reminder</string>
<string name="omnipod_alert_finish_setup_reminder_reminder">Finish setup reminder</string>
<string name="omnipod_alert_expiration">Pod will expire soon</string>
<string name="omnipod_alert_expiration_advisory">Pod will expire soon</string>
<string name="omnipod_alert_shutdown_imminent">Shutdown is imminent</string>
<string name="omnipod_alert_low_reservoir">Low reservoir</string>
<string name="omnipod_alert_unknown_alert">Unknown alert</string>
<string name="omnipod_error_set_basal_failed_uncertain">Setting basal profile might have failed. Delivery might be suspended! Please refresh Pod status.</string>
<string name="omnipod_error_set_temp_basal_failed_uncertain">Setting temp basal might have failed. If there was a temp basal already running, that may have been cancelled! Please refresh pod status.</string>
<string name="omnipod_error_set_time_failed_uncertain">Setting time might have failed. Delivery might be suspended! Please refresh Pod status.</string>
<string name="omnipod_bolus_failed_uncertain">Unable to verify whether the bolus succeeded. Please verify that your Pod is bolusing or cancel the bolus.</string>
<string name="omnipod_rl_stats">RL Stats</string>
<string name="omnipod_read_pulse_log_short">Pulse Log</string>
<string name="omnipod_pod_lot">LOT</string>
<string name="omnipod_pod_tid">TID</string>
<string name="omnipod_pod_fw_version">PM / PI version</string>
<string name="omnipod_errors">Errors</string>
<string name="comapareprofile">Compare profiles</string>
<string name="nav_profilehelper">Profile helper</string>
<string name="motoldefaultprofile">Default profile</string>

View file

@ -52,36 +52,5 @@
<item name="android:textColor">#ff0000</item>
</style>
<style name="WizardPagePodContent">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">8dp</item>
<item name="android:paddingLeft">20px</item>
<item name="android:paddingRight">20px</item>
<item name="android:textSize">18sp</item>
<!-- <item name="android:textColor">?android:textColorPrimary</item> -->
</style>
<style name="WizardPagePodListItem">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">20dp</item>
<item name="android:layout_marginTop">20dp</item>
<item name="android:paddingTop">20px</item>
<item name="android:paddingBottom">20px</item>
<item name="android:paddingLeft">60px</item>
<item name="android:paddingRight">60px</item>
<item name="android:textSize">18sp</item>
<!-- <item name="android:textColor">#000000</item> -->
</style>
<style name="PodInfoListView" parent="@android:style/Widget.ListView">
<item name="android:background">@color/colorLightGray</item>
<item name="android:cacheColorHint">@android:color/transparent</item>
<item name="android:divider">@android:color/black</item>
<item name="android:dividerHeight">1dp</item>
</style>
<style name="ProfileHelperAppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar"/>
</resources>

1
omnipod/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

100
omnipod/build.gradle Normal file
View file

@ -0,0 +1,100 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
// 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
}
kotlinOptions {
jvmTarget = '1.8'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
testCoverageEnabled(project.hasProperty('coverage'))
}
firebaseDisable {
System.setProperty("disableFirebase", "true")
ext.enableCrashlytics = false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
allprojects {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation project(':core')
implementation project(':rileylink')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation "androidx.preference:preference-ktx:1.1.1"
implementation "androidx.activity:activity-ktx:${activityVersion}"
implementation 'com.google.android.material:material:1.1.0'
implementation "io.reactivex.rxjava2:rxandroid:${rxandroid_version}"
// Graphview cannot be upgraded
implementation "com.jjoe64:graphview:4.0.1"
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2"
// Omnipod - start
implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'net.danlew:android.joda:2.10.6'
implementation "com.google.code.gson:gson:2.8.6"
implementation(name: "com.atech-software.android.library.wizardpager-1.1.4", ext: "aar")
// Omnipod - end
implementation "com.google.dagger:dagger-android:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version"
annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
annotationProcessor "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

View file

21
omnipod/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View file

@ -0,0 +1,16 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.nightscout.androidaps.plugins.pump.omnipod">
<application>
<service
android:name=".service.RileyLinkOmnipodService"
android:enabled="true"
android:exported="true" />
<activity android:name=".dialogs.PodManagementActivity" />
<activity android:name=".dialogs.PodHistoryActivity" />
<activity
android:name="com.atech.android.library.wizardpager.WizardPagerActivity"
android:theme="@style/AppTheme.NoActionBar" />
</application>
</manifest>

View file

@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.comm.exception;
import java.util.Locale;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.DeliveryStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodProgressStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.exception.OmnipodException;
public class IllegalDeliveryStatusException extends OmnipodException {

View file

@ -20,14 +20,14 @@ public class RLHistoryItemOmnipod extends RLHistoryItem {
public String getDescription(ResourceHelper resourceHelper) {
switch (this.source) {
case RileyLink:
case RLHistoryItemSource.RileyLink:
return "State: " + resourceHelper.gs(serviceState.getResourceId(targetDevice))
+ (this.errorCode == null ? "" : ", Error Code: " + errorCode);
case MedtronicPump:
case RLHistoryItemSource.MedtronicPump:
return resourceHelper.gs(pumpDeviceState.getResourceId());
case OmnipodCommand:
case RLHistoryItemSource.OmnipodCommand:
return omnipodCommandType.name();
default:

Some files were not shown because too many files have changed in this diff Show more