diff --git a/app-wear-shared/shared-impl/src/main/java/info/nightscout/shared/impl/di/SharedImplModule.kt b/app-wear-shared/shared-impl/src/main/java/info/nightscout/shared/impl/di/SharedImplModule.kt index ef1f5b5cc6..3bf15a91d9 100644 --- a/app-wear-shared/shared-impl/src/main/java/info/nightscout/shared/impl/di/SharedImplModule.kt +++ b/app-wear-shared/shared-impl/src/main/java/info/nightscout/shared/impl/di/SharedImplModule.kt @@ -6,6 +6,7 @@ import dagger.Module import dagger.Provides import info.nightscout.rx.interfaces.L import info.nightscout.shared.impl.logging.LImpl +import info.nightscout.shared.impl.sharedPreferences.SPImplementation import info.nightscout.shared.sharedPreferences.SP import javax.inject.Singleton @@ -17,7 +18,7 @@ open class SharedImplModule { @Provides @Singleton - fun provideSharedPreferences(context: Context): SP = info.nightscout.shared.impl.sharedPreferences.SPImplementation(PreferenceManager.getDefaultSharedPreferences(context), context) + fun provideSharedPreferences(context: Context): SP = SPImplementation(PreferenceManager.getDefaultSharedPreferences(context), context) @Provides @Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index 2ddff72812..e447b4eb2a 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -37,13 +37,13 @@ import info.nightscout.androidaps.activities.SingleFragmentActivity import info.nightscout.androidaps.databinding.ActivityMainBinding import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.constraints.versionChecker.VersionCheckerUtils -import info.nightscout.androidaps.utils.extensions.isRunningRealPumpTest import info.nightscout.androidaps.utils.protection.PasswordCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.configuration.setupwizard.SetupWizardActivity -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.UIRunnable import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy +import info.nightscout.core.utils.isRunningRealPumpTest import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.interfaces.AndroidPermission diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt index f83fd06af6..8d5194d400 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt @@ -19,7 +19,7 @@ import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.rx.AapsSchedulers diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt index 453787e8d4..f58044d2a8 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt @@ -5,7 +5,7 @@ import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.profile.ProfileFunction diff --git a/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt b/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt index 7ae0d9387c..84acdf8b8f 100644 --- a/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt @@ -8,16 +8,13 @@ import dagger.Provides import dagger.android.HasAndroidInjector import info.nightscout.androidaps.MainApp import info.nightscout.androidaps.implementations.ActivityNamesImpl -import info.nightscout.androidaps.interfaces.stats.DexcomTirCalculator -import info.nightscout.androidaps.interfaces.stats.TddCalculator -import info.nightscout.androidaps.interfaces.stats.TirCalculator +import info.nightscout.androidaps.implementations.ConfigImpl import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.PluginStore import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctionImpl import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefsImpl import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin -import info.nightscout.androidaps.implementations.ConfigImpl -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.implementation.AndroidPermissionImpl import info.nightscout.implementation.BolusTimerImpl @@ -52,6 +49,9 @@ import info.nightscout.interfaces.profile.ProfileFunction import info.nightscout.interfaces.pump.PumpSync import info.nightscout.interfaces.queue.CommandQueue import info.nightscout.interfaces.smsCommunicator.SmsCommunicator +import info.nightscout.interfaces.stats.DexcomTirCalculator +import info.nightscout.interfaces.stats.TddCalculator +import info.nightscout.interfaces.stats.TirCalculator import info.nightscout.interfaces.storage.FileStorage import info.nightscout.interfaces.storage.Storage import info.nightscout.interfaces.sync.DataSyncSelector diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt index ed988c862e..2b09cfd633 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt @@ -22,7 +22,7 @@ import info.nightscout.androidaps.databinding.ConfigbuilderFragmentBinding import info.nightscout.androidaps.plugins.configBuilder.events.EventConfigBuilderUpdateGui import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.PREFERENCES -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.plugin.PluginBase diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt index 64428e5b51..53a8e6e0ae 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt @@ -3,8 +3,8 @@ package info.nightscout.androidaps.plugins.configBuilder import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged import info.nightscout.androidaps.extensions.fromConstant -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.main.R +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.ProfileSwitch import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt index 19396ddbf7..701f97db60 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt @@ -20,8 +20,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.Das import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.database.ErosHistoryDatabase import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.PREFERENCES -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.impl.AppRepository diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 75cef4f6b0..d00e906186 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -45,7 +45,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugi import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.automation.AutomationPlugin -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.displayText import info.nightscout.core.profile.toSignedUnitsString import info.nightscout.core.profile.toTargetRangeString @@ -54,6 +53,7 @@ import info.nightscout.core.ui.UIRunnable import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.elements.SingleClickButton import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.core.wizard.QuickWizard import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt index 5460528f3a..9c4858872e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt @@ -12,7 +12,7 @@ import androidx.annotation.StringRes import androidx.appcompat.widget.PopupMenu import com.google.gson.Gson import info.nightscout.androidaps.R -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.aps.Loop import info.nightscout.rx.bus.RxBus diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt index dcc849be45..96e7e2c113 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt @@ -16,8 +16,8 @@ import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNo import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewCalcProgress import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.Overview import info.nightscout.interfaces.plugin.PluginBase diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt index 60af7b5544..90658f69df 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt @@ -21,8 +21,8 @@ import info.nightscout.androidaps.databinding.OverviewQuickwizardlistItemBinding import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange import info.nightscout.androidaps.utils.ActionModeHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.core.wizard.QuickWizard import info.nightscout.core.wizard.QuickWizardEntry import info.nightscout.interfaces.dragHelpers.ItemTouchHelperAdapter diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt index b125f38770..49f75c0c7e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt @@ -6,7 +6,7 @@ import android.content.Intent import android.os.Binder import android.os.IBinder import dagger.android.DaggerService -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.NotificationHolder import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt index 6f614d88eb..a16321cf39 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt @@ -12,10 +12,10 @@ import info.nightscout.androidaps.extensions.toStringShort import info.nightscout.androidaps.extensions.valueToUnitsString import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DecimalFormatter -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.generateCOBString import info.nightscout.core.iob.round import info.nightscout.core.profile.toSignedUnitsString +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Constants import info.nightscout.interfaces.NotificationHolder import info.nightscout.interfaces.iob.IobCobCalculator diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt index a95cb4f671..e5163cd0fc 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt @@ -6,7 +6,7 @@ import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerFragment import info.nightscout.androidaps.databinding.WearFragmentBinding -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.plugins.sync.nsShared.events.EventNSClientUpdateGUI import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt index bcf18702cf..80dc6efe3c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt @@ -3,14 +3,14 @@ package info.nightscout.androidaps.plugins.general.wear import android.content.Context import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.plugins.aps.loop.events.EventLoopUpdateGui import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.plugins.general.wear.wearintegration.DataHandlerMobile import info.nightscout.androidaps.plugins.general.wear.wearintegration.DataLayerListenerServiceMobileHelper -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType +import info.nightscout.plugins.aps.loop.events.EventLoopUpdateGui import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import info.nightscout.rx.events.EventAutosensCalculationFinished diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt index a6472fe6ee..37e8d1794c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt @@ -16,13 +16,13 @@ import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.services.AlarmSoundServiceHelper import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.DefaultValueHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.generateCOBString import info.nightscout.core.iob.round import info.nightscout.core.profile.fromMgdlToUnits import info.nightscout.core.profile.toMgdl import info.nightscout.core.profile.toTargetRangeString import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.core.wizard.BolusWizard import info.nightscout.core.wizard.QuickWizard import info.nightscout.core.wizard.QuickWizardEntry diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt index a51c6ac4d2..580ac12fd4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt @@ -20,7 +20,7 @@ import info.nightscout.androidaps.plugins.general.wear.WearPlugin import info.nightscout.androidaps.plugins.general.wear.events.EventWearUpdateGui import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DefaultValueHelper -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Config import info.nightscout.interfaces.aps.Loop diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt index a4bbf12e59..970a78457a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt @@ -13,12 +13,12 @@ import info.nightscout.androidaps.extensions.toTemporaryBasal import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.combine import info.nightscout.core.iob.copy import info.nightscout.core.iob.determineBasalJson import info.nightscout.core.iob.plus import info.nightscout.core.iob.round +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.ExtendedBolus import info.nightscout.database.entities.TemporaryBasal diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt index 9c98a7ce4c..860e6095ea 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt @@ -11,12 +11,10 @@ import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensDataObject import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress -import info.nightscout.sensitivity.SensitivityAAPSPlugin -import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper import info.nightscout.interfaces.Config @@ -33,6 +31,8 @@ import info.nightscout.rx.events.Event import info.nightscout.rx.events.EventAutosensCalculationFinished import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.sensitivity.SensitivityAAPSPlugin +import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.utils.DateUtil diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt index bce4e75a43..94fbc4f4f1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt @@ -10,12 +10,10 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensDataObject import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress -import info.nightscout.sensitivity.SensitivityAAPSPlugin -import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constants @@ -31,6 +29,8 @@ import info.nightscout.rx.events.Event import info.nightscout.rx.events.EventAutosensCalculationFinished import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.sensitivity.SensitivityAAPSPlugin +import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.utils.DateUtil diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt index 677a8a95d5..3f43740fb5 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt @@ -4,7 +4,7 @@ import android.bluetooth.BluetoothDevice import android.content.Context import android.content.Intent import dagger.android.DaggerBroadcastReceiver -import info.nightscout.androidaps.extensions.safeGetParcelableExtra +import info.nightscout.core.utils.extensions.safeGetParcelableExtra import info.nightscout.rx.bus.RxBus import info.nightscout.rx.events.EventBTChange import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt index 5a00ce742d..e7b01476c9 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt @@ -6,6 +6,11 @@ import android.provider.Telephony import androidx.work.Data import androidx.work.OneTimeWorkRequest import dagger.android.DaggerBroadcastReceiver +import info.nightscout.core.utils.extensions.copyDouble +import info.nightscout.core.utils.extensions.copyLong +import info.nightscout.core.utils.extensions.copyString +import info.nightscout.interfaces.receivers.Intents +import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin import info.nightscout.plugins.source.AidexPlugin import info.nightscout.plugins.source.DexcomPlugin import info.nightscout.plugins.source.EversensePlugin @@ -14,11 +19,6 @@ import info.nightscout.plugins.source.MM640gPlugin import info.nightscout.plugins.source.PoctechPlugin import info.nightscout.plugins.source.TomatoPlugin import info.nightscout.plugins.source.XdripPlugin -import info.nightscout.androidaps.utils.extensions.copyDouble -import info.nightscout.androidaps.utils.extensions.copyLong -import info.nightscout.androidaps.utils.extensions.copyString -import info.nightscout.interfaces.receivers.Intents -import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.BundleLogger import info.nightscout.rx.logging.LTag diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt index 98fec99bf4..c1ae353c8f 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt @@ -16,7 +16,7 @@ import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.R import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Config import info.nightscout.interfaces.LocalAlertUtils diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt index 547f16272e..eacc4d29de 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt @@ -15,9 +15,8 @@ import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobOref1Worker import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobOrefWorker -import info.nightscout.sensitivity.SensitivityOref1Plugin import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.iob.IobCobCalculator import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.rx.AapsSchedulers @@ -29,6 +28,7 @@ import info.nightscout.rx.events.EventPreferenceChange import info.nightscout.rx.events.EventTherapyEventChange import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.sensitivity.SensitivityOref1Plugin import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.utils.DateUtil import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt index c9123a2f99..1a73750663 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt @@ -6,12 +6,12 @@ import androidx.work.WorkerParameters import androidx.work.workDataOf import dagger.android.HasAndroidInjector import info.nightscout.androidaps.receivers.DataWorkerStorage +import info.nightscout.core.aps.loadBgData import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.iob.IobCobCalculator import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.utils.DateUtil -import loadBgData import javax.inject.Inject class LoadBgDataWorker( diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7d985c040a..6816375209 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -30,7 +30,6 @@ Turkish smscommunicator protection - absorption_category_settings last_cleanup_run %1$s Preferences Preferences @@ -114,13 +113,8 @@ Create notifications from NS announcements Stale data threshold [min] Urgent stale data threshold [min] - Interval for autosens [h] - Amount of hours in the past for sensitivity detection (carbs absorption time is excluded) OpenAPS Uploader - Absorption settings - Meal max absorption time [h] - Time in hours where is expected all carbs from meal will be absorbed Keep screen on Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet. By turning on Autosense feature remember to enter all eated carbs. Otherwise carbs deviations will be identified wrong as sensitivity change !! @@ -181,8 +175,6 @@ Basals Engineering mode enabled IobCobCalculator - Meal max absorption time [h] - Time at which any meal is considered absorbed. Remaining carbs will be cut off. Show notes field in treatment dialogs First insulin increment Second insulin increment @@ -191,8 +183,6 @@ Second carbs increment Third carbs increment CGM - Max autosens ratio - Min autosens ratio wearwizard_bg wearwizard_tt wearwizard_trend diff --git a/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index c967ecfb6c..1bbcde30f4 100644 --- a/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -5,8 +5,8 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.extensions.pureProfileFromJson -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.ProfileStoreObject +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.entities.embedments.InsulinConfiguration import info.nightscout.interfaces.Config diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt index 2d0d9d2d3f..980c135ab4 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt @@ -8,7 +8,7 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.receivers.ReceiverStatusStore -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Config import info.nightscout.interfaces.constraints.Constraints diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt index cafbd1173b..1b48a03b11 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/PrefsFileContract.kt @@ -4,8 +4,8 @@ import android.content.Context import android.content.Intent import androidx.activity.result.contract.ActivityResultContract import androidx.fragment.app.FragmentActivity -import info.nightscout.androidaps.extensions.safeGetParcelableExtra import info.nightscout.androidaps.plugins.general.maintenance.activities.PrefImportListActivity +import info.nightscout.core.utils.extensions.safeGetParcelableExtra import info.nightscout.interfaces.maintenance.PrefsFile class PrefsFileContract : ActivityResultContract() { diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/formats/EncryptedPrefsFormat.kt b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/formats/EncryptedPrefsFormat.kt index 383038e5e2..3df1361adc 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/formats/EncryptedPrefsFormat.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/formats/EncryptedPrefsFormat.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.general.maintenance.formats -import info.nightscout.androidaps.extensions.hexStringToByteArray -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.utils.CryptoUtil import info.nightscout.core.main.R +import info.nightscout.core.utils.hexStringToByteArray +import info.nightscout.core.utils.toHex import info.nightscout.interfaces.maintenance.PrefFileNotFoundError import info.nightscout.interfaces.maintenance.PrefFormatError import info.nightscout.interfaces.maintenance.PrefIOError diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt index efa2a91ccc..4a2ee08ed0 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt @@ -11,9 +11,9 @@ import android.provider.Settings import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat -import info.nightscout.androidaps.extensions.safeEnable import info.nightscout.core.main.R import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.extensions.safeEnable import info.nightscout.shared.interfaces.ResourceHelper import javax.inject.Inject import javax.inject.Singleton diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt b/core/core-main/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt index 7146746b1d..8b5c7727ca 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.utils -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLogger import org.spongycastle.util.encoders.Base64 import java.nio.ByteBuffer diff --git a/core/core-main/src/main/java/info/nightscout/core/aps/AutosensDataStoreExtension.kt b/core/core-main/src/main/java/info/nightscout/core/aps/AutosensDataStoreExtension.kt index 38c45e06c3..4ab6978fbb 100644 --- a/core/core-main/src/main/java/info/nightscout/core/aps/AutosensDataStoreExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/core/aps/AutosensDataStoreExtension.kt @@ -1,7 +1,9 @@ -import info.nightscout.rx.events.EventBucketedDataCreated +package info.nightscout.core.aps + import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.aps.AutosensDataStore import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventBucketedDataCreated import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import info.nightscout.shared.utils.DateUtil diff --git a/core/core-main/src/main/java/info/nightscout/core/pump/PumpStateExtension.kt b/core/core-main/src/main/java/info/nightscout/core/pump/PumpStateExtension.kt index f82adc569b..2021b13739 100644 --- a/core/core-main/src/main/java/info/nightscout/core/pump/PumpStateExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/core/pump/PumpStateExtension.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.extensions +package info.nightscout.core.pump import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.interfaces.profile.Profile diff --git a/core/core-main/src/main/java/info/nightscout/core/wizard/BolusWizard.kt b/core/core-main/src/main/java/info/nightscout/core/wizard/BolusWizard.kt index 95cfbce611..5714cb9dfe 100644 --- a/core/core-main/src/main/java/info/nightscout/core/wizard/BolusWizard.kt +++ b/core/core-main/src/main/java/info/nightscout/core/wizard/BolusWizard.kt @@ -4,7 +4,6 @@ import android.content.Context import android.text.Spanned import com.google.common.base.Joiner import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.extensions.highValueToUnitsToString import info.nightscout.androidaps.extensions.lowValueToUnitsToString import info.nightscout.androidaps.logging.UserEntryLogger @@ -14,6 +13,7 @@ import info.nightscout.core.main.R import info.nightscout.core.profile.fromMgdlToUnits import info.nightscout.core.profile.toMgdl import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.extensions.formatColor import info.nightscout.database.entities.BolusCalculatorResult import info.nightscout.database.entities.OfflineEvent import info.nightscout.database.entities.TemporaryTarget diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/pump/common/utils/DateTimeUtilUTest.java b/core/core-main/src/test/java/info/nightscout/androidaps/pump/common/utils/DateTimeUtilUTest.java index 8a8bc558b7..2de161c2cb 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/pump/common/utils/DateTimeUtilUTest.java +++ b/core/core-main/src/test/java/info/nightscout/androidaps/pump/common/utils/DateTimeUtilUTest.java @@ -3,7 +3,7 @@ package info.nightscout.androidaps.pump.common.utils; import org.junit.Assert; import org.junit.Test; -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil; +import info.nightscout.core.utils.DateTimeUtil; public class DateTimeUtilUTest { @@ -13,7 +13,7 @@ public class DateTimeUtilUTest { long dt1 = 20191001182301L; long dt2 = 20191001192805L; - int aTechDateDifferenceAsMinutes = DateTimeUtil.getATechDateDiferenceAsMinutes(dt1, dt2); + int aTechDateDifferenceAsMinutes = DateTimeUtil.getATechDateDifferenceAsMinutes(dt1, dt2); Assert.assertEquals(65, aTechDateDifferenceAsMinutes); diff --git a/core/utils/build.gradle b/core/utils/build.gradle index bb59fa38b3..6ddce702df 100644 --- a/core/utils/build.gradle +++ b/core/utils/build.gradle @@ -30,4 +30,7 @@ dependencies { // api "com.google.firebase:firebase-messaging-ktx" // api 'com.google.firebase:firebase-auth-ktx' // api 'com.google.firebase:firebase-database-ktx' + + //WorkManager + api "androidx.work:work-runtime:$work_version" // DataWorkerStorage } \ No newline at end of file diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/Concurrency.kt b/core/utils/src/main/java/info/nightscout/core/utils/Concurrency.kt similarity index 93% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/Concurrency.kt rename to core/utils/src/main/java/info/nightscout/core/utils/Concurrency.kt index e1da1919a5..d76fd718f4 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/Concurrency.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/Concurrency.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.extensions +package info.nightscout.core.utils @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "NOTHING_TO_INLINE") inline fun Any.wait() = (this as Object).wait() diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/utils/DateTimeUtil.java b/core/utils/src/main/java/info/nightscout/core/utils/DateTimeUtil.java similarity index 97% rename from core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/utils/DateTimeUtil.java rename to core/utils/src/main/java/info/nightscout/core/utils/DateTimeUtil.java index c96e99b89b..8ec3c99f29 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/plugins/pump/common/utils/DateTimeUtil.java +++ b/core/utils/src/main/java/info/nightscout/core/utils/DateTimeUtil.java @@ -1,6 +1,6 @@ -package info.nightscout.androidaps.plugins.pump.common.utils; +package info.nightscout.core.utils; -/** +/* * Created by andy on 10/25/18. */ @@ -119,7 +119,7 @@ public class DateTimeUtil { return toATechDate(gc); } - +/* public static boolean isSameDay(LocalDateTime ldt1, LocalDateTime ldt2) { return (ldt1.getYear() == ldt2.getYear() && // @@ -127,7 +127,7 @@ public class DateTimeUtil { ldt1.getDayOfMonth() == ldt2.getDayOfMonth()); } - +*/ public static boolean isSameDay(long ldt1, long ldt2) { @@ -226,6 +226,7 @@ public class DateTimeUtil { } +/* public static boolean isSameDayATDAndMillis(long atechDateTime, long timeInMillis) { GregorianCalendar dt = new GregorianCalendar(); @@ -235,6 +236,7 @@ public class DateTimeUtil { return (isSameDay(atechDateTime, entryDate)); } +*/ public static long toMillisFromATD(long atechDateTime) { @@ -245,13 +247,13 @@ public class DateTimeUtil { } - public static int getATechDateDiferenceAsMinutes(Long date1, Long date2) { + public static int getATechDateDifferenceAsMinutes(Long date1, Long date2) { Minutes minutes = Minutes.minutesBetween(toLocalDateTime(date1), toLocalDateTime(date2)); return minutes.getMinutes(); } - public static int getATechDateDiferenceAsSeconds(Long date1, Long date2) { + public static int getATechDateDifferenceAsSeconds(Long date1, Long date2) { Seconds seconds = Seconds.secondsBetween(toLocalDateTime(date1), toLocalDateTime(date2)); return seconds.getSeconds(); } @@ -273,12 +275,14 @@ public class DateTimeUtil { } +/* public static long getATDWithAddedMinutes(Long atd, int minutesDiff) { GregorianCalendar oldestEntryTime = DateTimeUtil.toGregorianCalendar(atd); oldestEntryTime.add(Calendar.MINUTE, minutesDiff); return toATechDate(oldestEntryTime); } +*/ public static long getATDWithAddedMinutes(GregorianCalendar oldestEntryTime, int minutesDiff) { oldestEntryTime.add(Calendar.MINUTE, minutesDiff); @@ -286,9 +290,11 @@ public class DateTimeUtil { return toATechDate(oldestEntryTime); } +/* public static long getTimeInFutureFromMinutes(long startTime, int minutes) { return startTime + getTimeInMs(minutes); } +*/ public static long getTimeInFutureFromMinutes(int minutes) { return System.currentTimeMillis() + getTimeInMs(minutes); diff --git a/core/core-main/src/main/java/info/nightscout/core/utils/EspressoTestHelper.kt b/core/utils/src/main/java/info/nightscout/core/utils/EspressoTestHelper.kt similarity index 88% rename from core/core-main/src/main/java/info/nightscout/core/utils/EspressoTestHelper.kt rename to core/utils/src/main/java/info/nightscout/core/utils/EspressoTestHelper.kt index fae622497a..aa5bde0a5b 100644 --- a/core/core-main/src/main/java/info/nightscout/core/utils/EspressoTestHelper.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/EspressoTestHelper.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.utils.extensions +package info.nightscout.core.utils @Synchronized fun isRunningTest(): Boolean { diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/HexByteArrayConversion.kt b/core/utils/src/main/java/info/nightscout/core/utils/HexByteArrayConversion.kt similarity index 92% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/HexByteArrayConversion.kt rename to core/utils/src/main/java/info/nightscout/core/utils/HexByteArrayConversion.kt index 71f6c92835..5ef6cc9b8a 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/HexByteArrayConversion.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/HexByteArrayConversion.kt @@ -1,6 +1,6 @@ -package info.nightscout.androidaps.extensions +package info.nightscout.core.utils -import java.util.* +import java.util.Locale private val HEX_CHARS = "0123456789abcdef".toCharArray() diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/BluetoothAdapterExtension.kt b/core/utils/src/main/java/info/nightscout/core/utils/extensions/BluetoothAdapterExtension.kt similarity index 96% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/BluetoothAdapterExtension.kt rename to core/utils/src/main/java/info/nightscout/core/utils/extensions/BluetoothAdapterExtension.kt index b247800ef9..a313db4b41 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/BluetoothAdapterExtension.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/extensions/BluetoothAdapterExtension.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.extensions +package info.nightscout.core.utils.extensions import android.bluetooth.BluetoothAdapter import android.os.SystemClock diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/HtmlString.kt b/core/utils/src/main/java/info/nightscout/core/utils/extensions/HtmlString.kt similarity index 92% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/HtmlString.kt rename to core/utils/src/main/java/info/nightscout/core/utils/extensions/HtmlString.kt index 72df946cea..c593107d94 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/HtmlString.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/extensions/HtmlString.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.extensions +package info.nightscout.core.utils.extensions import android.content.Context import androidx.annotation.AttrRes diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/IntentExtension.kt b/core/utils/src/main/java/info/nightscout/core/utils/extensions/IntentExtension.kt similarity index 94% rename from core/core-main/src/main/java/info/nightscout/androidaps/extensions/IntentExtension.kt rename to core/utils/src/main/java/info/nightscout/core/utils/extensions/IntentExtension.kt index 0390ef0ac5..d3c236cb11 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/IntentExtension.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/extensions/IntentExtension.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.extensions +package info.nightscout.core.utils.extensions import android.content.Intent import java.io.Serializable diff --git a/app/src/main/java/info/nightscout/androidaps/utils/extensions/WorkerDataBuilder.kt b/core/utils/src/main/java/info/nightscout/core/utils/extensions/WorkerDataBuilder.kt similarity index 93% rename from app/src/main/java/info/nightscout/androidaps/utils/extensions/WorkerDataBuilder.kt rename to core/utils/src/main/java/info/nightscout/core/utils/extensions/WorkerDataBuilder.kt index b5b75e5805..d72bbd12f3 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/extensions/WorkerDataBuilder.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/extensions/WorkerDataBuilder.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.utils.extensions +package info.nightscout.core.utils.extensions import android.os.Bundle import androidx.work.Data diff --git a/core/utils/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt b/core/utils/src/main/java/info/nightscout/core/utils/fabric/FabricPrivacy.kt similarity index 98% rename from core/utils/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt rename to core/utils/src/main/java/info/nightscout/core/utils/fabric/FabricPrivacy.kt index 5e213a6af7..227d12daa1 100644 --- a/core/utils/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/fabric/FabricPrivacy.kt @@ -1,4 +1,4 @@ -package info.nightscout.core.fabric +package info.nightscout.core.utils.fabric import android.os.Bundle import com.google.firebase.analytics.FirebaseAnalytics @@ -36,6 +36,7 @@ class FabricPrivacy @Inject constructor( } // Analytics logCustom + @Suppress("unused") fun logCustom(name: String, event: Bundle) { try { if (fabricEnabled()) { @@ -51,6 +52,7 @@ class FabricPrivacy @Inject constructor( } // Analytics logCustom + @Suppress("unused") fun logCustom(event: Bundle) { try { if (fabricEnabled()) { diff --git a/core/utils/src/main/java/info/nightscout/core/fabric/InstanceId.kt b/core/utils/src/main/java/info/nightscout/core/utils/fabric/InstanceId.kt similarity index 85% rename from core/utils/src/main/java/info/nightscout/core/fabric/InstanceId.kt rename to core/utils/src/main/java/info/nightscout/core/utils/fabric/InstanceId.kt index 5eff95ff18..1ad89a9684 100644 --- a/core/utils/src/main/java/info/nightscout/core/fabric/InstanceId.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/fabric/InstanceId.kt @@ -1,4 +1,4 @@ -package info.nightscout.core.fabric +package info.nightscout.core.utils.fabric import com.google.firebase.installations.FirebaseInstallations diff --git a/implementation/src/main/java/info/nightscout/implementation/di/ImplementationModule.kt b/implementation/src/main/java/info/nightscout/implementation/di/ImplementationModule.kt index bc95fc2940..cb2f107b8e 100644 --- a/implementation/src/main/java/info/nightscout/implementation/di/ImplementationModule.kt +++ b/implementation/src/main/java/info/nightscout/implementation/di/ImplementationModule.kt @@ -4,7 +4,7 @@ import android.content.Context import dagger.Module import dagger.Provides import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.implementation.HardLimitsImpl import info.nightscout.implementation.logging.LoggerUtilsImpl diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt b/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt index 60c162209d..959e81647a 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt @@ -15,8 +15,8 @@ import info.nightscout.androidaps.extensions.getCustomizedName import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.pump.insertCarbsTransaction +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.entities.ProfileSwitch import info.nightscout.database.entities.interfaces.end diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt b/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt index 577a7171ed..208366f90e 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt @@ -5,9 +5,9 @@ import android.content.Context import android.os.Build import android.os.PowerManager import android.os.SystemClock -import info.nightscout.androidaps.extensions.safeDisable -import info.nightscout.androidaps.extensions.safeEnable import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning +import info.nightscout.core.utils.extensions.safeDisable +import info.nightscout.core.utils.extensions.safeEnable import info.nightscout.implementation.R import info.nightscout.interfaces.AndroidPermission import info.nightscout.interfaces.Config diff --git a/implementation/src/main/java/info/nightscout/implementation/resources/ResourceHelperImpl.kt b/implementation/src/main/java/info/nightscout/implementation/resources/ResourceHelperImpl.kt index 7ee1656a24..540e843c02 100644 --- a/implementation/src/main/java/info/nightscout/implementation/resources/ResourceHelperImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/resources/ResourceHelperImpl.kt @@ -18,9 +18,9 @@ import androidx.annotation.StringRes import androidx.appcompat.app.AppCompatDelegate import androidx.appcompat.view.ContextThemeWrapper import androidx.core.content.ContextCompat -import info.nightscout.core.ui.getThemeColor -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.main.R +import info.nightscout.core.ui.getThemeColor +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.shared.interfaces.ResourceHelper import java.util.Locale import javax.inject.Inject diff --git a/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirCalculatorImpl.kt b/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirCalculatorImpl.kt index 7615a6b690..a61f667eee 100644 --- a/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirCalculatorImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirCalculatorImpl.kt @@ -4,10 +4,10 @@ import android.annotation.SuppressLint import android.content.Context import android.view.ViewGroup import android.widget.TableLayout -import info.nightscout.androidaps.interfaces.stats.DexcomTIR -import info.nightscout.androidaps.interfaces.stats.DexcomTirCalculator import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.stats.DexcomTIR +import info.nightscout.interfaces.stats.DexcomTirCalculator import info.nightscout.interfaces.utils.MidnightTime import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.utils.DateUtil diff --git a/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirImpl.kt b/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirImpl.kt index 4292af3e81..0afa2aa44f 100644 --- a/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/stats/DexcomTirImpl.kt @@ -6,13 +6,13 @@ import android.graphics.Typeface import android.view.Gravity import android.widget.TableRow import android.widget.TextView -import info.nightscout.androidaps.interfaces.stats.DexcomTIR import info.nightscout.core.profile.toCurrentUnitsString import info.nightscout.core.profile.toUnitsString import info.nightscout.implementation.R import info.nightscout.interfaces.Constants import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.stats.DexcomTIR import java.util.Calendar import kotlin.math.pow import kotlin.math.roundToInt diff --git a/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt b/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt index e71281b3b1..442bb57f5e 100644 --- a/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt @@ -10,7 +10,6 @@ import android.widget.TableRow import android.widget.TextView import info.nightscout.androidaps.extensions.toTableRow import info.nightscout.androidaps.extensions.toTableRowHeader -import info.nightscout.androidaps.interfaces.stats.TddCalculator import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.TotalDailyDose import info.nightscout.database.entities.embedments.InterfaceIDs @@ -20,6 +19,7 @@ import info.nightscout.implementation.R import info.nightscout.interfaces.iob.IobCobCalculator import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.stats.TddCalculator import info.nightscout.interfaces.utils.MidnightTime import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/implementation/src/main/java/info/nightscout/implementation/stats/TirCalculatorImpl.kt b/implementation/src/main/java/info/nightscout/implementation/stats/TirCalculatorImpl.kt index f92dee237b..b01622401c 100644 --- a/implementation/src/main/java/info/nightscout/implementation/stats/TirCalculatorImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/stats/TirCalculatorImpl.kt @@ -8,14 +8,14 @@ import android.view.Gravity import android.view.ViewGroup import android.widget.TableLayout import android.widget.TextView -import info.nightscout.androidaps.interfaces.stats.TIR -import info.nightscout.androidaps.interfaces.stats.TirCalculator import info.nightscout.core.profile.toCurrentUnitsString import info.nightscout.database.impl.AppRepository import info.nightscout.implementation.R import info.nightscout.interfaces.Constants import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.stats.TIR +import info.nightscout.interfaces.stats.TirCalculator import info.nightscout.interfaces.utils.MidnightTime import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.utils.DateUtil diff --git a/implementation/src/main/java/info/nightscout/implementation/stats/TirImpl.kt b/implementation/src/main/java/info/nightscout/implementation/stats/TirImpl.kt index 5974f9e35c..ea9dd3b294 100644 --- a/implementation/src/main/java/info/nightscout/implementation/stats/TirImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/stats/TirImpl.kt @@ -5,10 +5,10 @@ import android.content.Context import android.view.Gravity import android.widget.TableRow import android.widget.TextView -import info.nightscout.shared.interfaces.ResourceHelper -import info.nightscout.androidaps.interfaces.stats.TIR -import info.nightscout.shared.utils.DateUtil import info.nightscout.implementation.R +import info.nightscout.interfaces.stats.TIR +import info.nightscout.shared.interfaces.ResourceHelper +import info.nightscout.shared.utils.DateUtil class TirImpl(override val date: Long, override val lowThreshold: Double, override val highThreshold: Double) : TIR { diff --git a/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index c967ecfb6c..1bbcde30f4 100644 --- a/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -5,8 +5,8 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.extensions.pureProfileFromJson -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.ProfileStoreObject +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.entities.embedments.InsulinConfiguration import info.nightscout.interfaces.Config diff --git a/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt b/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt index 0071533e5a..cf91ad1abe 100644 --- a/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt @@ -7,7 +7,7 @@ import info.nightscout.androidaps.TestBase import info.nightscout.automation.AutomationPlugin import info.nightscout.automation.services.LocationServiceHelper import info.nightscout.automation.triggers.Trigger -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.aps.Loop diff --git a/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt b/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt index a5b5a1f56c..1e4433ccdf 100644 --- a/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt @@ -7,7 +7,7 @@ import info.nightscout.androidaps.TestBase import info.nightscout.automation.AutomationPlugin import info.nightscout.automation.services.LocationServiceHelper import info.nightscout.automation.triggers.Trigger -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.aps.Loop diff --git a/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt b/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt index 02f8d42b3e..2433d1b730 100644 --- a/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt @@ -7,7 +7,7 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBaseWithProfile import info.nightscout.androidaps.TestPumpPlugin -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.Bolus import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java index 7661cc3a5c..fa1cf76097 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java @@ -30,7 +30,7 @@ import info.nightscout.androidaps.plugins.pump.insight.descriptors.InsightState; import info.nightscout.androidaps.plugins.pump.insight.descriptors.TotalDailyDose; import info.nightscout.androidaps.plugins.pump.insight.events.EventLocalInsightUpdateGUI; import info.nightscout.androidaps.utils.DecimalFormatter; -import info.nightscout.core.fabric.FabricPrivacy; +import info.nightscout.core.utils.fabric.FabricPrivacy; import info.nightscout.interfaces.queue.Callback; import info.nightscout.interfaces.queue.CommandQueue; import info.nightscout.rx.AapsSchedulers; diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 6aab035541..00c298c078 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.insight; -import static info.nightscout.androidaps.extensions.PumpStateExtensionKt.convertedToAbsolute; -import static info.nightscout.androidaps.extensions.PumpStateExtensionKt.getPlannedRemainingMinutes; +import static info.nightscout.core.pump.PumpStateExtensionKt.convertedToAbsolute; +import static info.nightscout.core.pump.PumpStateExtensionKt.getPlannedRemainingMinutes; import android.app.NotificationChannel; import android.app.NotificationManager; diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java index b72bfc3589..f66b5acd61 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java @@ -33,13 +33,13 @@ import java.util.List; import javax.inject.Inject; import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; -import info.nightscout.androidaps.extensions.BluetoothAdapterExtensionKt; -import info.nightscout.androidaps.extensions.IntentExtensionKt; import info.nightscout.androidaps.insight.R; import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck; import info.nightscout.androidaps.plugins.pump.insight.connection_service.InsightConnectionService; import info.nightscout.androidaps.plugins.pump.insight.descriptors.InsightState; import info.nightscout.androidaps.plugins.pump.insight.utils.ExceptionTranslator; +import info.nightscout.core.utils.extensions.BluetoothAdapterExtensionKt; +import info.nightscout.core.utils.extensions.IntentExtensionKt; import info.nightscout.interfaces.pump.PumpSync; public class InsightPairingActivity extends NoSplashAppCompatActivity implements InsightConnectionService.StateCallback, View.OnClickListener, InsightConnectionService.ExceptionCallback { diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/utils/ConnectionEstablisher.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/utils/ConnectionEstablisher.java index fa23118e77..3b503bba25 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/utils/ConnectionEstablisher.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/utils/ConnectionEstablisher.java @@ -8,7 +8,8 @@ import java.io.IOException; import java.lang.reflect.Method; import java.util.UUID; -import info.nightscout.androidaps.extensions.BluetoothAdapterExtensionKt; +import info.nightscout.core.utils.extensions.BluetoothAdapterExtensionKt; + public class ConnectionEstablisher extends Thread { private final Callback callback; diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/DexcomTIR.kt b/interfaces/src/main/java/info/nightscout/interfaces/stats/DexcomTIR.kt similarity index 90% rename from core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/DexcomTIR.kt rename to interfaces/src/main/java/info/nightscout/interfaces/stats/DexcomTIR.kt index 3bb9389cc8..463dd3d0f8 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/DexcomTIR.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/stats/DexcomTIR.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.interfaces.stats +package info.nightscout.interfaces.stats import android.content.Context import android.widget.TableRow diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/DexcomTirCalculator.kt b/interfaces/src/main/java/info/nightscout/interfaces/stats/DexcomTirCalculator.kt similarity index 77% rename from core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/DexcomTirCalculator.kt rename to interfaces/src/main/java/info/nightscout/interfaces/stats/DexcomTirCalculator.kt index bf203cb48a..bdc1e927a7 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/DexcomTirCalculator.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/stats/DexcomTirCalculator.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.interfaces.stats +package info.nightscout.interfaces.stats import android.content.Context import android.widget.TableLayout diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TIR.kt b/interfaces/src/main/java/info/nightscout/interfaces/stats/TIR.kt similarity index 91% rename from core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TIR.kt rename to interfaces/src/main/java/info/nightscout/interfaces/stats/TIR.kt index 4cdfc13e64..1c3ff9a916 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TIR.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/stats/TIR.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.interfaces.stats +package info.nightscout.interfaces.stats import android.content.Context import android.widget.TableRow diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TddCalculator.kt b/interfaces/src/main/java/info/nightscout/interfaces/stats/TddCalculator.kt similarity index 91% rename from core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TddCalculator.kt rename to interfaces/src/main/java/info/nightscout/interfaces/stats/TddCalculator.kt index dbe37c5233..f558d24dd6 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TddCalculator.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/stats/TddCalculator.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.interfaces.stats +package info.nightscout.interfaces.stats import android.content.Context import android.util.LongSparseArray diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TirCalculator.kt b/interfaces/src/main/java/info/nightscout/interfaces/stats/TirCalculator.kt similarity index 83% rename from core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TirCalculator.kt rename to interfaces/src/main/java/info/nightscout/interfaces/stats/TirCalculator.kt index 3a3d1cc6e3..a4561265f8 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/stats/TirCalculator.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/stats/TirCalculator.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.interfaces.stats +package info.nightscout.interfaces.stats import android.content.Context import android.util.LongSparseArray diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/aps/OpenAPSFragment.kt b/plugins/aps/src/main/java/info/nightscout/plugins/aps/OpenAPSFragment.kt index 2fedc3bc4b..4e8eef2684 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/aps/OpenAPSFragment.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/aps/OpenAPSFragment.kt @@ -13,7 +13,7 @@ import android.view.ViewGroup import androidx.core.view.MenuProvider import androidx.lifecycle.Lifecycle import dagger.android.support.DaggerFragment -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.plugins.aps.databinding.OpenapsFragmentBinding import info.nightscout.plugins.aps.events.EventOpenAPSUpdateGui diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt index a69564922a..8158fcf37b 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt @@ -5,8 +5,8 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.utils.MidnightUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper import info.nightscout.interfaces.aps.APS diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt index d0c02182b3..4357095bef 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt @@ -4,7 +4,6 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.getPassedDurationToTimeInMinutes import info.nightscout.androidaps.extensions.plannedRemainingMinutes -import info.nightscout.androidaps.interfaces.stats.TddCalculator import info.nightscout.core.profile.toMgdl import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.aps.DetermineBasalAdapter @@ -16,6 +15,7 @@ import info.nightscout.interfaces.iob.MealData import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.stats.TddCalculator import info.nightscout.interfaces.utils.Round import info.nightscout.plugins.aps.R import info.nightscout.plugins.aps.logger.LoggerCallback diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt index eeb7e624c2..af33b4ce09 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt @@ -21,10 +21,10 @@ import dagger.android.HasAndroidInjector import dagger.android.support.DaggerFragment import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.ProfileStoreObject import info.nightscout.core.profile.fromMgdlToUnits import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit import info.nightscout.interfaces.Constants diff --git a/plugins/aps/src/main/res/values/strings.xml b/plugins/aps/src/main/res/values/strings.xml index f96ef6f82b..3fc172ff66 100644 --- a/plugins/aps/src/main/res/values/strings.xml +++ b/plugins/aps/src/main/res/values/strings.xml @@ -109,8 +109,6 @@ Minimum grams of carbs to display a carbs suggestion alert. Carbs suggestions below this number will not trigger a notification. BG value below which insulin is suspended. Default value uses standard target model. User can set value between 60mg/dl (3.3mmol/l) and 100mg/dl(5.5mmol/l). Values below 65/3.6 result in use of default model BG level below which low glucose suspend occurs - Default value: 1.2\nThis is a multiplier cap for autosens (and soon autotune) to set a 20%% max limit on how high the autosens ratio can be, which in turn determines how high autosens can adjust basals, how low it can adjust ISF, and how low it can set the BG target. - Default value: 0.7\nThe other side of the autosens safety limits, putting a cap on how low autosens can adjust basals, and how high it can adjust ISF and BG targets. Increasing max basal value because setting is lower than your max basal in profile max basal multiplier diff --git a/plugins/aps/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/plugins/aps/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index c967ecfb6c..1bbcde30f4 100644 --- a/plugins/aps/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/plugins/aps/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -5,8 +5,8 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.extensions.pureProfileFromJson -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.ProfileStoreObject +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.entities.embedments.InsulinConfiguration import info.nightscout.interfaces.Config diff --git a/plugins/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt b/plugins/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt index b0fc22a5da..7e3ff69478 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt @@ -31,8 +31,8 @@ import info.nightscout.automation.dialogs.EditEventDialog import info.nightscout.automation.events.EventAutomationDataChanged import info.nightscout.automation.events.EventAutomationUpdateGui import info.nightscout.automation.triggers.TriggerConnector -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.interfaces.dragHelpers.ItemTouchHelperAdapter diff --git a/plugins/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt b/plugins/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt index 5b92bb8028..8c70fc228b 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt @@ -39,7 +39,7 @@ import info.nightscout.automation.triggers.TriggerTempTargetValue import info.nightscout.automation.triggers.TriggerTime import info.nightscout.automation.triggers.TriggerTimeRange import info.nightscout.automation.triggers.TriggerWifiSsid -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.aps.Loop import info.nightscout.interfaces.constraints.Constraints diff --git a/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt b/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt index 7e3f785f58..b9fa2da22d 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt @@ -21,8 +21,8 @@ import info.nightscout.automation.events.EventAutomationDataChanged import info.nightscout.automation.events.EventAutomationUpdateAction import info.nightscout.automation.events.EventAutomationUpdateGui import info.nightscout.automation.events.EventAutomationUpdateTrigger -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import info.nightscout.shared.extensions.toVisibility diff --git a/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt b/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt index 1d3d73de47..1c1fde9bb7 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt @@ -14,7 +14,7 @@ import info.nightscout.automation.events.EventTriggerRemove import info.nightscout.automation.triggers.Trigger import info.nightscout.automation.triggers.TriggerConnector import info.nightscout.automation.triggers.TriggerDummy -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/plugins/automation/src/main/java/info/nightscout/automation/services/LocationService.kt b/plugins/automation/src/main/java/info/nightscout/automation/services/LocationService.kt index 04319d01cc..8685488122 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/services/LocationService.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/services/LocationService.kt @@ -18,7 +18,7 @@ import com.google.android.gms.location.LocationServices import dagger.android.DaggerService import info.nightscout.automation.R import info.nightscout.automation.events.EventLocationChange -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.NotificationHolder import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus diff --git a/plugins/automation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/plugins/automation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index ce367adc28..e0461e947b 100644 --- a/plugins/automation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/plugins/automation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -5,8 +5,8 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.extensions.pureProfileFromJson import info.nightscout.androidaps.utils.DefaultValueHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.ProfileStoreObject +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Config import info.nightscout.interfaces.plugin.ActivePlugin diff --git a/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SWDefinition.kt b/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SWDefinition.kt index 79c6ab6609..03d6313407 100644 --- a/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SWDefinition.kt +++ b/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SWDefinition.kt @@ -9,7 +9,6 @@ import androidx.appcompat.app.AppCompatActivity import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.utils.CryptoUtil -import info.nightscout.androidaps.utils.extensions.isRunningTest import info.nightscout.configuration.R import info.nightscout.configuration.setupwizard.elements.SWBreak import info.nightscout.configuration.setupwizard.elements.SWButton @@ -24,6 +23,7 @@ import info.nightscout.configuration.setupwizard.elements.SWInfoText import info.nightscout.configuration.setupwizard.elements.SWPlugin import info.nightscout.configuration.setupwizard.elements.SWPreference import info.nightscout.configuration.setupwizard.elements.SWRadioButton +import info.nightscout.core.utils.isRunningTest import info.nightscout.interfaces.AndroidPermission import info.nightscout.interfaces.Config import info.nightscout.interfaces.ConfigBuilder diff --git a/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SetupWizardActivity.kt b/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SetupWizardActivity.kt index df03eaff95..ec099c8cf9 100644 --- a/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SetupWizardActivity.kt +++ b/plugins/configuration/src/main/java/info/nightscout/configuration/setupwizard/SetupWizardActivity.kt @@ -9,8 +9,8 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.configuration.R import info.nightscout.configuration.databinding.ActivitySetupwizardBinding import info.nightscout.configuration.setupwizard.elements.SWItem -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.locale.LocaleHelper.update import info.nightscout.interfaces.ui.ActivityNames import info.nightscout.rx.AapsSchedulers diff --git a/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopFragment.kt index 3ccae10db0..c01c8a053d 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopFragment.kt @@ -12,8 +12,8 @@ import android.view.ViewGroup import androidx.core.view.MenuProvider import androidx.lifecycle.Lifecycle import dagger.android.support.DaggerFragment -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.pump.toHtml +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.aps.Loop import info.nightscout.interfaces.constraints.Constraint import info.nightscout.interfaces.utils.HtmlHelper diff --git a/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopPlugin.kt index 2c0645e22a..16bdbd94af 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/aps/loop/LoopPlugin.kt @@ -20,7 +20,7 @@ import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.receivers.ReceiverStatusStore -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.OfflineEvent import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/plugins/main/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt index e4d5378b62..34447d45c9 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt @@ -1,7 +1,7 @@ package info.nightscout.plugins.constraints.bgQualityCheck import dagger.android.HasAndroidInjector -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.constraints.Constraint import info.nightscout.interfaces.constraints.Constraints import info.nightscout.interfaces.iob.IobCobCalculator diff --git a/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/ObjectivesFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/ObjectivesFragment.kt index ff6fbb8c71..60e643aecd 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/ObjectivesFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/ObjectivesFragment.kt @@ -18,8 +18,8 @@ import androidx.recyclerview.widget.RecyclerView import dagger.android.support.DaggerFragment import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.receivers.ReceiverStatusStore -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.entities.ValueWithUnit diff --git a/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/dialogs/NtpProgressDialog.kt b/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/dialogs/NtpProgressDialog.kt index a4adb728d1..6ff549f96c 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/dialogs/NtpProgressDialog.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/constraints/objectives/dialogs/NtpProgressDialog.kt @@ -6,9 +6,9 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerDialogFragment -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.main.R import info.nightscout.core.main.databinding.DialogBolusprogressBinding +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.bus.RxBus import info.nightscout.rx.events.EventNtpStatus diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/actions/ActionsFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/actions/ActionsFragment.kt index 27b54b4036..daf0109584 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/general/actions/ActionsFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/general/actions/ActionsFragment.kt @@ -14,10 +14,10 @@ import info.nightscout.androidaps.extensions.toStringMedium import info.nightscout.androidaps.extensions.toStringShort import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.UIRunnable import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.elements.SingleClickButton +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.impl.AppRepository diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt index 85cf911c5f..8e1c2865a5 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt @@ -10,8 +10,8 @@ import info.nightscout.androidaps.extensions.toStringFull import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DefaultValueHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.round +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.aps.Loop import info.nightscout.interfaces.iob.IobCobCalculator diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt index 69b9dc55f3..0aba61c476 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt @@ -15,8 +15,8 @@ import dagger.android.support.DaggerFragment import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.core.ui.UIRunnable -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.Food import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt index 88ae48bd4f..613790698f 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt @@ -5,7 +5,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerFragment -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.smsCommunicator.Sms import info.nightscout.interfaces.smsCommunicator.SmsCommunicator import info.nightscout.interfaces.utils.HtmlHelper diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt index ea8adc9908..0ec25d275a 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt @@ -19,12 +19,12 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProv import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.generateCOBString import info.nightscout.core.iob.round import info.nightscout.core.profile.toCurrentUnits import info.nightscout.core.profile.toMgdl import info.nightscout.core.profile.toUnitsString +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.OfflineEvent import info.nightscout.database.entities.TemporaryTarget import info.nightscout.database.entities.UserEntry.Action diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt index dca46a5df4..15966ac650 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/general/smsCommunicator/activities/SmsCommunicatorOtpActivity.kt @@ -14,9 +14,9 @@ import com.google.common.primitives.Ints.min import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.interfaces.smsCommunicator.SmsCommunicator diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt index 65caa9a5c3..2809693721 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt @@ -6,10 +6,10 @@ import android.os.Bundle import dagger.android.HasAndroidInjector import info.nightscout.androidaps.extensions.toStringShort import info.nightscout.androidaps.utils.DecimalFormatter -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.generateCOBString import info.nightscout.core.iob.round import info.nightscout.core.profile.fromMgdlToUnits +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.aps.Loop import info.nightscout.interfaces.iob.IobCobCalculator import info.nightscout.interfaces.plugin.PluginBase diff --git a/plugins/main/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt index 60cbe6fe87..a5c6dec506 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt @@ -14,9 +14,9 @@ import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.fromMgdlToUnits import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit import info.nightscout.interfaces.Constants diff --git a/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpFragment.kt index 6ab354aca2..015f2b9394 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpFragment.kt @@ -8,7 +8,7 @@ import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerFragment import info.nightscout.androidaps.extensions.toStringFull -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.iob.IobCobCalculator import info.nightscout.interfaces.profile.ProfileFunction import info.nightscout.plugins.R diff --git a/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt index 8c1ab06a9d..510d039413 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/pump/virtual/VirtualPumpPlugin.kt @@ -8,7 +8,8 @@ import info.nightscout.androidaps.dialogs.BolusProgressDialog import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.plannedRemainingMinutes import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.InstanceId import info.nightscout.interfaces.Config import info.nightscout.interfaces.iob.IobCobCalculator import info.nightscout.interfaces.notifications.Notification @@ -383,7 +384,7 @@ open class VirtualPumpPlugin @Inject constructor( override fun model(): PumpType = pumpDescription.pumpType - override fun serialNumber(): String = info.nightscout.core.fabric.InstanceId.instanceId + override fun serialNumber(): String = InstanceId.instanceId override fun shortStatus(veryShort: Boolean): String = "Virtual Pump" diff --git a/plugins/main/src/main/java/info/nightscout/plugins/source/BGSourceFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/source/BGSourceFragment.kt index 430d1cefd1..21c3617bc3 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/source/BGSourceFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/source/BGSourceFragment.kt @@ -19,8 +19,8 @@ import info.nightscout.androidaps.extensions.directionToIcon import info.nightscout.androidaps.extensions.valueToUnitsString import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.ActionModeHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.GlucoseValue import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/plugins/main/src/main/java/info/nightscout/plugins/source/GlunovoPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/source/GlunovoPlugin.kt index 901bb56cdf..9e64dd30a2 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/source/GlunovoPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/source/GlunovoPlugin.kt @@ -6,7 +6,7 @@ import android.os.Handler import android.os.HandlerThread import dagger.android.HasAndroidInjector import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.GlucoseValue import info.nightscout.database.entities.TherapyEvent import info.nightscout.database.entities.UserEntry diff --git a/plugins/main/src/main/java/info/nightscout/plugins/source/IntelligoPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/source/IntelligoPlugin.kt index 0b1cbe6e73..075fbd7a20 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/source/IntelligoPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/source/IntelligoPlugin.kt @@ -8,7 +8,7 @@ import android.os.HandlerThread import android.util.Log import dagger.android.HasAndroidInjector import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.GlucoseValue import info.nightscout.database.entities.TherapyEvent import info.nightscout.database.entities.UserEntry diff --git a/plugins/main/src/main/java/info/nightscout/plugins/source/RandomBgPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/source/RandomBgPlugin.kt index 31d2ad6e6d..8ef41d1f31 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/source/RandomBgPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/source/RandomBgPlugin.kt @@ -4,7 +4,7 @@ import android.os.Handler import android.os.HandlerThread import android.os.SystemClock import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.utils.extensions.isRunningTest +import info.nightscout.core.utils.isRunningTest import info.nightscout.database.entities.GlucoseValue import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.transactions.CgmSourceTransaction diff --git a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsShared/NSClientFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsShared/NSClientFragment.kt index 5715153b6d..1c80fcafe4 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsShared/NSClientFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsShared/NSClientFragment.kt @@ -14,8 +14,8 @@ import androidx.core.view.MenuProvider import androidx.lifecycle.Lifecycle import dagger.android.support.DaggerFragment import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry import info.nightscout.interfaces.Config import info.nightscout.interfaces.plugin.ActivePlugin diff --git a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/NSClientPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/NSClientPlugin.kt index 62009d5e8c..60fe9cba87 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/NSClientPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/NSClientPlugin.kt @@ -12,9 +12,9 @@ import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceScreen import androidx.preference.SwitchPreference import dagger.android.HasAndroidInjector -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.toast.showToastAdNotification import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constants import info.nightscout.interfaces.plugin.PluginBase diff --git a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/services/NSClientService.kt b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/services/NSClientService.kt index 944ce8c951..42b7ced67b 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/services/NSClientService.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/services/NSClientService.kt @@ -19,7 +19,7 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Config import info.nightscout.interfaces.notifications.Notification diff --git a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt index 4f152b7994..252b76dee1 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclientV3/NSClientV3Plugin.kt @@ -12,9 +12,9 @@ import androidx.work.OneTimeWorkRequest import androidx.work.WorkInfo import androidx.work.WorkManager import dagger.android.HasAndroidInjector -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.toast.showToastAdNotification import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constants import info.nightscout.interfaces.plugin.PluginBase diff --git a/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolFragment.kt index 6d53ad1691..7f69a8170a 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolFragment.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolFragment.kt @@ -6,7 +6,7 @@ import android.view.View import android.view.ViewGroup import android.widget.ScrollView import dagger.android.support.DaggerFragment -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.plugins.R import info.nightscout.plugins.databinding.TidepoolFragmentBinding import info.nightscout.plugins.sync.tidepool.comm.TidepoolUploader diff --git a/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolPlugin.kt index 76e0cf2a89..218594406b 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/sync/tidepool/TidepoolPlugin.kt @@ -7,9 +7,9 @@ import androidx.preference.PreferenceFragmentCompat import dagger.android.HasAndroidInjector import info.nightscout.androidaps.events.EventNewBG import info.nightscout.androidaps.receivers.ReceiverStatusStore -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.toast.showToastAdNotification import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Constants import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginDescription diff --git a/plugins/main/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/plugins/main/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index c967ecfb6c..1bbcde30f4 100644 --- a/plugins/main/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/plugins/main/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -5,8 +5,8 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.extensions.pureProfileFromJson -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.ProfileStoreObject +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.entities.embedments.InsulinConfiguration import info.nightscout.interfaces.Config diff --git a/plugins/main/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt b/plugins/main/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt index f708c0edb0..986377d9d8 100644 --- a/plugins/main/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt +++ b/plugins/main/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt @@ -4,7 +4,7 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStoreObject -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.GlucoseValue import info.nightscout.interfaces.constraints.Constraint import info.nightscout.interfaces.iob.IobCobCalculator diff --git a/plugins/main/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt b/plugins/main/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt index 0d16de3241..1989444372 100644 --- a/plugins/main/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt +++ b/plugins/main/src/test/java/info/nightscout/plugins/pump/virtual/VirtualPumpPluginUTest.kt @@ -2,7 +2,7 @@ package info.nightscout.plugins.pump.virtual import dagger.android.AndroidInjector import info.nightscout.androidaps.TestBase -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.iob.IobCobCalculator import info.nightscout.interfaces.profile.ProfileFunction diff --git a/plugins/sensitivity/build.gradle b/plugins/sensitivity/build.gradle index 95cd5b5bbe..69153664be 100644 --- a/plugins/sensitivity/build.gradle +++ b/plugins/sensitivity/build.gradle @@ -22,7 +22,7 @@ dependencies { implementation project(':app-wear-shared:shared') implementation project(':database:entities') implementation project(':database:impl') - //implementation project(':core:core-main') + implementation project(':core:core-main') implementation project(':core:utils') implementation project(':core:ui') } \ No newline at end of file diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt index c7fbf7669d..693778a08b 100644 --- a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt +++ b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt @@ -12,7 +12,6 @@ import info.nightscout.interfaces.aps.AutosensResult import info.nightscout.interfaces.aps.Sensitivity.SensitivityType import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType -import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/plugins/sensitivity/src/main/res/values/strings.xml b/plugins/sensitivity/src/main/res/values/strings.xml index 065f277f08..963baecc22 100644 --- a/plugins/sensitivity/src/main/res/values/strings.xml +++ b/plugins/sensitivity/src/main/res/values/strings.xml @@ -1,5 +1,7 @@ + absorption_category_settings + SENS Sensitivity Oref1 Sensitivity AAPS @@ -9,4 +11,18 @@ Sensitivity is calculated as a weighted average from deviations. Newer deviations have higher weight. Minimal carb absorption is calculated from max carb absorption time from preferences. This algorithm is the fastest in following sensitivity changes. UAM disabled because it rely on Oref1 sensitivity plugin + Absorption settings + Meal max absorption time [h] + Time in hours where is expected all carbs from meal will be absorbed + Interval for autosens [h] + Amount of hours in the past for sensitivity detection (carbs absorption time is excluded) + Default value: 1.2\nThis is a multiplier cap for autosens (and soon autotune) to set a 20%% max limit on how high the autosens ratio can be, which in turn determines how high autosens can adjust basals, how low it can adjust ISF, and how low it can set the BG target. + Default value: 0.7\nThe other side of the autosens safety limits, putting a cap on how low autosens can adjust basals, and how high it can adjust ISF and BG targets. + Max autosens ratio + Min autosens ratio + min_5m_carbimpact + Default value: 3.0 (AMA) or 8.0 (SMB). This is a setting for default carb absorption impact per 5 minutes. The default is an expected 3mg/dl/5min. This affects how fast COB are decayed, and how much carb absorption is assumed in calculating future predicted BG, when BG is falling more than expected, or not rising as much as expected. + Meal max absorption time [h] + Time at which any meal is considered absorbed. Remaining carbs will be cut off. + \ No newline at end of file diff --git a/plugins/sensitivity/src/main/res/xml/pref_absorption_aaps.xml b/plugins/sensitivity/src/main/res/xml/pref_absorption_aaps.xml index 9a1be55a9e..15b855ff19 100644 --- a/plugins/sensitivity/src/main/res/xml/pref_absorption_aaps.xml +++ b/plugins/sensitivity/src/main/res/xml/pref_absorption_aaps.xml @@ -6,18 +6,18 @@ diff --git a/plugins/sensitivity/src/main/res/xml/pref_absorption_oref1.xml b/plugins/sensitivity/src/main/res/xml/pref_absorption_oref1.xml index a745b3bb97..ae993b049f 100644 --- a/plugins/sensitivity/src/main/res/xml/pref_absorption_oref1.xml +++ b/plugins/sensitivity/src/main/res/xml/pref_absorption_oref1.xml @@ -6,7 +6,7 @@ () { diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt index 216a0e0ded..01a1afe2ab 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt @@ -22,8 +22,8 @@ import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpSta import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpConfigurationChanged import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpValuesChanged import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.pump.PumpSync import info.nightscout.interfaces.pump.WarnColors diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt index c7427d5a57..04e000758c 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt @@ -23,7 +23,6 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryTBR import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncEntriesCreator import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryResult @@ -46,7 +45,8 @@ import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtro import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.isSame -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.DateTimeUtil +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.plugin.PluginDescription diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt index 4a2a20d407..c034894b25 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt @@ -1,7 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm import android.os.SystemClock -import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException @@ -9,7 +8,6 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.Radi import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder @@ -34,6 +32,8 @@ import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpSta import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.createByteArray import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.getByteArrayFromUnsignedShort +import info.nightscout.core.utils.DateTimeUtil +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.pump.core.defs.PumpDeviceState import info.nightscout.pump.core.utils.ByteUtil import info.nightscout.rx.logging.LTag diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryEntry.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryEntry.kt index d36cc0f031..2c6fe83dc3 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryEntry.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryEntry.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history import com.google.gson.annotations.Expose -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil +import info.nightscout.core.utils.DateTimeUtil import info.nightscout.pump.core.utils.ByteUtil import info.nightscout.pump.core.utils.StringUtil diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/CGMSHistoryEntry.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/CGMSHistoryEntry.kt index 43dbbaabd0..31e7c2ec3c 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/CGMSHistoryEntry.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/CGMSHistoryEntry.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryEntry +import info.nightscout.core.utils.DateTimeUtil import info.nightscout.pump.core.utils.ByteUtil import org.apache.commons.lang3.StringUtils import org.joda.time.LocalDateTime diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt index 4b59a5bc51..7fdb52d071 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RecordDecodeStatus import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms.CGMSHistoryEntryType.Companion.getByCode import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.core.utils.DateTimeUtil import info.nightscout.pump.core.utils.ByteUtil import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag @@ -173,7 +173,7 @@ class MedtronicCGMSHistoryDecoder constructor( val data = entry.datetime return if (entry.entryType.dateType === CGMSHistoryEntryType.DateType.MinuteSpecific) { val atechDateTime = DateTimeUtil.toATechDate(parseYear(data[3].toInt()), parseMonths(data[0].toInt(), data[1].toInt()), - parseDay(data[2].toInt()), parseHours(data[0].toInt()), parseMinutes(data[1].toInt()), 0) + parseDay(data[2].toInt()), parseHours(data[0].toInt()), parseMinutes(data[1].toInt()), 0) entry.atechDateTime = atechDateTime atechDateTime } else if (entry.entryType.dateType === CGMSHistoryEntryType.DateType.SecondSpecific) { diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt index 2e7166e986..95e08dbc28 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RecordDecodeStatus import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType.Companion.getByCode @@ -12,6 +11,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalPair import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.core.utils.DateTimeUtil import info.nightscout.pump.core.utils.ByteUtil import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt index 0f13f33875..d19e53b43d 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil +import info.nightscout.core.utils.DateTimeUtil import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import java.util.Collections diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt index 526a4885b7..9e912e06a9 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt @@ -8,7 +8,6 @@ import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntry import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryBolus import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryTBR import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.R import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry @@ -26,6 +25,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.core.utils.DateTimeUtil import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.pump.DetailedBolusInfo diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt index 43cdee1c0f..032457bf06 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BolusWizardDTO.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil -import java.util.* +import info.nightscout.core.utils.DateTimeUtil +import java.util.Locale /** * Created by andy on 18.05.15. diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt index 9470e0978f..2cc57b4317 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType +import info.nightscout.core.utils.DateTimeUtil import info.nightscout.rx.logging.AAPSLogger class TempBasalProcessDTO constructor(var itemOne: PumpHistoryEntry, @@ -48,17 +48,17 @@ class TempBasalProcessDTO constructor(var itemOne: PumpHistoryEntry, return 0 } } else if (itemTwoRewind!=null) { - val secondsDiff = DateTimeUtil.getATechDateDiferenceAsSeconds(itemOne.atechDateTime, DateTimeUtil.getATDWithAddedSeconds(itemTwo!!.atechDateTime, -2)) + val secondsDiff = DateTimeUtil.getATechDateDifferenceAsSeconds(itemOne.atechDateTime, DateTimeUtil.getATDWithAddedSeconds(itemTwo!!.atechDateTime, -2)) return secondsDiff } else { //aapsLogger.debug(LTag.PUMP, "Found 2 items for duration: itemOne=$itemOne, itemTwo=$itemTwo") - val secondsDiff = DateTimeUtil.getATechDateDiferenceAsSeconds(itemOne.atechDateTime, itemTwo!!.atechDateTime) + val secondsDiff = DateTimeUtil.getATechDateDifferenceAsSeconds(itemOne.atechDateTime, itemTwo!!.atechDateTime) //aapsLogger.debug(LTag.PUMP, "Difference in seconds: $secondsDiff") return secondsDiff } } else { //aapsLogger.debug(LTag.PUMP, "Found 2 items for duration (in SuspendMode): itemOne=$itemOne, itemTwo=$itemTwo") - val secondsDiff = DateTimeUtil.getATechDateDiferenceAsSeconds(itemOne.atechDateTime, itemTwo!!.atechDateTime) + val secondsDiff = DateTimeUtil.getATechDateDifferenceAsSeconds(itemOne.atechDateTime, itemTwo!!.atechDateTime) //aapsLogger.debug(LTag.PUMP, "Difference in seconds: $secondsDiff") return secondsDiff } diff --git a/pump/omnipod-common/build.gradle b/pump/omnipod-common/build.gradle index 4174e66704..fecebd7b2a 100644 --- a/pump/omnipod-common/build.gradle +++ b/pump/omnipod-common/build.gradle @@ -19,6 +19,7 @@ android { dependencies { implementation project(':libraries') implementation project(':core:core-main') + implementation project(':core:utils') implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:shared') implementation project(':interfaces') diff --git a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt index 8851b4239a..b069fb2437 100644 --- a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt +++ b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/PodActivationWizardActivity.kt @@ -2,9 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activat import android.os.Bundle import androidx.annotation.IdRes -import info.nightscout.androidaps.extensions.safeGetSerializableExtra import info.nightscout.androidaps.plugins.pump.omnipod.common.R import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.activity.OmnipodWizardActivityBase +import info.nightscout.core.utils.extensions.safeGetSerializableExtra abstract class PodActivationWizardActivity : OmnipodWizardActivityBase() { companion object { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index 0f37f5d3c0..d8ad889584 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -5,12 +5,8 @@ import android.os.Handler import android.os.HandlerThread import android.text.format.DateFormat import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.extensions.convertedToAbsolute -import info.nightscout.androidaps.extensions.plannedRemainingMinutes -import info.nightscout.androidaps.extensions.toStringFull import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandDeactivatePod import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandDisableSuspendAlerts @@ -41,7 +37,11 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.Constants import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.mapProfileToBasalProgram import info.nightscout.androidaps.utils.DecimalFormatter.to0Decimal import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.pump.convertedToAbsolute +import info.nightscout.core.pump.plannedRemainingMinutes +import info.nightscout.core.pump.toStringFull +import info.nightscout.core.utils.DateTimeUtil +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/Id.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/Id.kt index 88215ba752..b97aa83da6 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/Id.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/Id.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex import java.nio.ByteBuffer data class Id(val address: ByteArray) { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt index 8b242dc867..7cb156e673 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt @@ -3,8 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm import android.bluetooth.BluetoothAdapter import android.bluetooth.BluetoothManager import android.content.Context -import info.nightscout.androidaps.extensions.toHex -import info.nightscout.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.BusyException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ConnectException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.CouldNotSendCommandException @@ -30,6 +28,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEven import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.base.Command import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager +import info.nightscout.core.utils.toHex +import info.nightscout.interfaces.Config import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.core.Observable diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt index 766c2cbd2b..d7a288809e 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt @@ -5,10 +5,10 @@ import android.bluetooth.BluetoothGattCallback import android.bluetooth.BluetoothGattCharacteristic import android.bluetooth.BluetoothGattDescriptor import android.bluetooth.BluetoothProfile -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.CharacteristicType.Companion.byValue import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.DisconnectHandler +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import java.util.UUID diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/command/BleCommand.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/command/BleCommand.kt index 4ad00e75b4..a8ae365c22 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/command/BleCommand.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/command/BleCommand.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex import java.nio.ByteBuffer object BleCommandRTS : BleCommand(BleCommandType.RTS) diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt index c7ed4bf60a..0942dbdd36 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt @@ -1,10 +1,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag - import org.spongycastle.crypto.engines.AESEngine import org.spongycastle.crypto.modes.CCMBlockCipher import org.spongycastle.crypto.params.AEADParameters diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/CouldNotParseMessageException.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/CouldNotParseMessageException.kt index 73d4eb1d42..22f0529d84 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/CouldNotParseMessageException.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/exceptions/CouldNotParseMessageException.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex class CouldNotParseMessageException(val payload: ByteArray) : Exception("Could not parse message payload: ${payload.toHex()}") diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt index a7b4f9eb77..c3d0fb3988 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt @@ -5,12 +5,12 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io import android.bluetooth.BluetoothGatt import android.bluetooth.BluetoothGattCharacteristic import android.bluetooth.BluetoothGattDescriptor -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.BleCommCallbacks import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationError import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandRTS import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ConnectException +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import java.util.concurrent.BlockingQueue diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/CrcMismatchException.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/CrcMismatchException.kt index 6515fd5a75..367a78b5e2 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/CrcMismatchException.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/CrcMismatchException.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex class CrcMismatchException(val expected: Long, val actual: Long, val payload: ByteArray) : Exception("CRC mismatch. Actual: $actual. Expected: $expected. Payload: ${payload.toHex()}") diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/IncorrectPacketException.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/IncorrectPacketException.kt index a02b9afa8a..f5fef98783 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/IncorrectPacketException.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/IncorrectPacketException.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex class IncorrectPacketException( val payload: ByteArray, diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt index 171d025af7..2fe4308b04 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommand import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandAbort import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandCTS @@ -20,6 +19,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.DataB import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.BlePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncoding.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncoding.kt index f3c5d58e27..eb79b538fb 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncoding.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncoding.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException +import info.nightscout.core.utils.toHex import java.nio.ByteBuffer /*** diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt index 7132835a27..0260c9ee08 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair -import info.nightscout.androidaps.extensions.toHex -import info.nightscout.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator +import info.nightscout.core.utils.toHex +import info.nightscout.interfaces.Config import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import org.spongycastle.crypto.engines.AESEngine diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt index 8d61cd9ca0..72e0781181 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt @@ -1,8 +1,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair -import info.nightscout.androidaps.extensions.hexStringToByteArray -import info.nightscout.androidaps.extensions.toHex -import info.nightscout.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.PairingException @@ -12,10 +9,12 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message. import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding.Companion.parseKeys import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator +import info.nightscout.core.utils.hexStringToByteArray +import info.nightscout.core.utils.toHex +import info.nightscout.interfaces.Config import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag - internal class LTKExchanger( private val aapsLogger: AAPSLogger, config: Config, diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/PairResult.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/PairResult.kt index 135a7820b9..0e677f4027 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/PairResult.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/PairResult.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex data class PairResult(val ltk: ByteArray, val msgSeq: Byte) { init { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt index dc8affeca2..55a47cb332 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt @@ -6,9 +6,6 @@ import android.bluetooth.BluetoothManager import android.bluetooth.BluetoothProfile import android.content.Context import android.os.SystemClock -import info.nightscout.interfaces.Constants -import info.nightscout.androidaps.extensions.toHex -import info.nightscout.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.ServiceDiscoverer import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.BleCommCallbacks @@ -21,6 +18,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.DataB import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager +import info.nightscout.core.utils.toHex +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.Constants import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import java.util.concurrent.CountDownLatch diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapAkaAttribute.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapAkaAttribute.kt index b81d5c1216..4707ae3ac5 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapAkaAttribute.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapAkaAttribute.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException -import java.util.* +import info.nightscout.core.utils.toHex +import java.util.LinkedList enum class EapAkaAttributeType(val type: Byte) { AT_RAND(1), diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt index d0266122f6..2a32ad22d3 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt @@ -1,10 +1,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag - import java.nio.ByteBuffer enum class EapCode(val code: Byte) { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt index 09c6fe015e..c06c5a3410 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex import info.nightscout.interfaces.Config import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt index f2ec5f561c..91e1fb036d 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.EnDecrypt import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.CouldNotParseResponseException @@ -14,6 +13,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message. import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding.Companion.parseKeys import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.base.Command import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt index b950c58afa..cf11aeb2ae 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt @@ -1,7 +1,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session -import info.nightscout.androidaps.extensions.toHex -import info.nightscout.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.Nonce import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.SessionEstablishmentException @@ -9,6 +7,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message. import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageType +import info.nightscout.core.utils.toHex +import info.nightscout.interfaces.Config import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import java.security.SecureRandom diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt index b6971c0c1b..536a048d83 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt @@ -13,8 +13,6 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup -import info.nightscout.interfaces.pump.defs.PumpType -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType import info.nightscout.androidaps.plugins.pump.omnipod.dash.R @@ -25,6 +23,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.History import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.InitialResult import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.ResolvedResult import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.TempBasalRecord +import info.nightscout.core.utils.DateTimeUtil +import info.nightscout.interfaces.pump.defs.PumpType import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.logging.LTag import java.util.Calendar diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt index 848d59987d..67de2f007b 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt @@ -13,8 +13,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definitio import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.DashPodActivationWizardActivity import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivation.DashPodDeactivationWizardActivity -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.queue.Callback import info.nightscout.interfaces.queue.CommandQueue import info.nightscout.interfaces.ui.ActivityNames diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt index f8c4cb9d48..709ad7a36d 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt @@ -26,9 +26,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definitio import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.UIRunnable import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constants import info.nightscout.interfaces.notifications.Notification diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt index 01a264c5e8..5d1d0ddda0 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt @@ -15,7 +15,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.Resolve import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.Constants import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.I8n import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.mapProfileToBasalProgram -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.profile.ProfileFunction import info.nightscout.interfaces.pump.DetailedBolusInfo diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt index 5117ebf0a9..7cef6f4bad 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecryptTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLoggerTest import org.junit.Assert import org.junit.Test diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt index 11b50e451b..046e59a422 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessagePacketTest.kt @@ -1,9 +1,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id -import info.nightscout.rx.logging.AAPSLoggerTest +import info.nightscout.core.utils.toHex import org.junit.Assert.assertEquals import org.junit.Test diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt index 0ff9673c1d..9be7d5848e 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadJoinerTest.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner +import info.nightscout.core.utils.toHex import org.junit.Assert.assertEquals import org.junit.Test diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt index ffc3510d57..925899cb45 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitJoinTest.kt @@ -1,11 +1,11 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter +import info.nightscout.core.utils.toHex import org.junit.Assert.assertEquals import org.junit.Test -import java.util.* +import java.util.Random class PayloadSplitJoinTest { diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt index a8f148acb4..a702f1ce01 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/PayloadSplitterTest.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter +import info.nightscout.core.utils.toHex import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Test diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt index ee1f18bad2..ad6bef32c3 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/StringLengthPrefixEncodingTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import com.google.crypto.tink.subtle.Hex -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex import org.junit.Assert.assertEquals import org.junit.Test diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt index 2583dc178a..a1d34508a2 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchangeTest.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator +import info.nightscout.core.utils.toHex import info.nightscout.interfaces.Config import info.nightscout.rx.logging.AAPSLoggerTest import org.junit.Assert.assertEquals diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt index fe064a18cd..8e5ec3eaea 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessageTest.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex import info.nightscout.rx.logging.AAPSLoggerTest import org.junit.Assert import org.junit.Test diff --git a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt index 1ac87b3a89..c94fa401ba 100644 --- a/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt +++ b/pump/omnipod-dash/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/MilenageTest.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.extensions.toHex +import info.nightscout.core.utils.toHex import info.nightscout.interfaces.Config import info.nightscout.rx.logging.AAPSLoggerTest import org.junit.Assert diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java index dabf420b29..8f158f4ca9 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros; -import static info.nightscout.androidaps.extensions.PumpStateExtensionKt.convertedToAbsolute; -import static info.nightscout.androidaps.extensions.PumpStateExtensionKt.getPlannedRemainingMinutes; -import static info.nightscout.androidaps.extensions.PumpStateExtensionKt.toStringFull; import static info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants.BASAL_STEP_DURATION; +import static info.nightscout.core.pump.PumpStateExtensionKt.convertedToAbsolute; +import static info.nightscout.core.pump.PumpStateExtensionKt.getPlannedRemainingMinutes; +import static info.nightscout.core.pump.PumpStateExtensionKt.toStringFull; import android.content.ComponentName; import android.content.Context; @@ -43,7 +43,6 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkPumpDevice; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkPumpInfo; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData; -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil; import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType; import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandDeactivatePod; import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandHandleTimeChange; @@ -78,8 +77,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil; import info.nightscout.androidaps.services.AlarmSoundService; import info.nightscout.androidaps.utils.DecimalFormatter; -import info.nightscout.core.fabric.FabricPrivacy; import info.nightscout.core.pump.DetailedBolusInfoExtensionKt; +import info.nightscout.core.utils.DateTimeUtil; +import info.nightscout.core.utils.fabric.FabricPrivacy; import info.nightscout.interfaces.notifications.Notification; import info.nightscout.interfaces.plugin.ActivePlugin; import info.nightscout.interfaces.plugin.PluginDescription; diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/history/database/ErosHistoryRecordEntity.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/history/database/ErosHistoryRecordEntity.java index 79e677858d..c190e1a631 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/history/database/ErosHistoryRecordEntity.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/history/database/ErosHistoryRecordEntity.java @@ -4,7 +4,7 @@ import androidx.room.Entity; import androidx.room.Index; import androidx.room.PrimaryKey; -import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil; +import info.nightscout.core.utils.DateTimeUtil; /** * Created by andy on 30.11.2019. diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java index ee9aa65adc..960bd6b533 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java @@ -14,7 +14,6 @@ import javax.inject.Inject; import javax.inject.Singleton; import dagger.android.HasAndroidInjector; -import info.nightscout.androidaps.extensions.PumpStateExtensionKt; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair; @@ -65,6 +64,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.Om import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil; import info.nightscout.core.pump.DetailedBolusInfoExtensionKt; +import info.nightscout.core.pump.PumpStateExtensionKt; import info.nightscout.interfaces.notifications.Notification; import info.nightscout.interfaces.profile.Profile; import info.nightscout.interfaces.pump.DetailedBolusInfo; diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt index 9e7d8e46d6..c3e0eff2e0 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt @@ -24,8 +24,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodE import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandReadPulseLog import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.ErosPodActivationWizardActivity import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.ErosPodDeactivationWizardActivity -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Config import info.nightscout.interfaces.queue.Callback import info.nightscout.interfaces.queue.CommandQueue diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt index 471f9481fc..712badadc2 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt @@ -35,9 +35,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.Comman import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.core.ui.UIRunnable -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.Constants import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.plugin.ActivePlugin diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt index ced169452b..8666597efc 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt @@ -6,16 +6,16 @@ import android.content.ServiceConnection import android.text.format.DateFormat import com.google.gson.GsonBuilder import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.extensions.convertedToAbsolute -import info.nightscout.androidaps.extensions.plannedRemainingMinutes -import info.nightscout.androidaps.extensions.toStringFull import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus import info.nightscout.androidaps.plugins.pump.common.defs.PumpDriverState import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryCarbs import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.utils.DecimalFormatter.to0Decimal import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal -import info.nightscout.core.fabric.FabricPrivacy +import info.nightscout.core.pump.convertedToAbsolute +import info.nightscout.core.pump.plannedRemainingMinutes +import info.nightscout.core.pump.toStringFull +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.interfaces.constraints.Constraints import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.plugin.PluginDescription diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt index 7d867a98c1..ad0d7d61c8 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt @@ -6,12 +6,12 @@ import android.content.Intent import androidx.annotation.StringRes import com.google.gson.Gson import dagger.android.DaggerBroadcastReceiver -import info.nightscout.androidaps.extensions.safeGetParcelableExtra -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.events.EventPumpConnectionParametersChanged +import info.nightscout.core.utils.extensions.safeGetParcelableExtra import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/ui/src/main/java/info/nightscout/ui/activities/ProfileHelperActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/ProfileHelperActivity.kt index f653e0b8f2..57286f2a95 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/ProfileHelperActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/ProfileHelperActivity.kt @@ -10,15 +10,15 @@ import com.google.android.material.tabs.TabLayout import com.google.common.collect.Lists import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.interfaces.stats.TddCalculator -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.profile.ProfileFunction import info.nightscout.interfaces.profile.PureProfile +import info.nightscout.interfaces.stats.TddCalculator import info.nightscout.interfaces.ui.ActivityNames import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.events.EventLocalProfileChanged diff --git a/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt index bdb5aa9932..cc865a52b2 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt @@ -4,14 +4,14 @@ import android.annotation.SuppressLint import android.os.Bundle import android.widget.TextView import info.nightscout.androidaps.activities.NoSplashAppCompatActivity -import info.nightscout.androidaps.interfaces.stats.DexcomTirCalculator -import info.nightscout.androidaps.interfaces.stats.TddCalculator -import info.nightscout.androidaps.interfaces.stats.TirCalculator import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources +import info.nightscout.interfaces.stats.DexcomTirCalculator +import info.nightscout.interfaces.stats.TddCalculator +import info.nightscout.interfaces.stats.TirCalculator import info.nightscout.rx.AapsSchedulers import info.nightscout.ui.R import info.nightscout.ui.activityMonitor.ActivityMonitor diff --git a/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt index 53539a6482..f2bc6ee958 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt @@ -4,6 +4,7 @@ import android.os.Bundle import android.widget.ArrayAdapter import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.InstanceId import info.nightscout.interfaces.plugin.ActivePlugin import info.nightscout.interfaces.profile.ProfileFunction import info.nightscout.interfaces.ui.ActivityNames @@ -29,7 +30,7 @@ class SurveyActivity : NoSplashAppCompatActivity() { binding = ActivitySurveyBinding.inflate(layoutInflater) setContentView(binding.root) - binding.id.text = info.nightscout.core.fabric.InstanceId.instanceId + binding.id.text = InstanceId.instanceId val profileStore = activePlugin.activeProfileSource.profile val profileList = profileStore?.getProfileList() ?: return @@ -67,7 +68,7 @@ class SurveyActivity : NoSplashAppCompatActivity() { binding.submit.setOnClickListener { val r = FirebaseRecord() - r.id = info.nightscout.core.fabric.InstanceId.instanceId + r.id = InstanceId.instanceId r.age = SafeParse.stringToInt(binding.age.text.toString()) r.weight = SafeParse.stringToInt(binding.weight.text.toString()) if (r.age < 1 || r.age > 120) { diff --git a/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt index 695fe6fa02..424499ca59 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt @@ -16,8 +16,8 @@ import android.widget.TableRow import android.widget.TextView import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.extensions.total -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.main.R +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.TotalDailyDose import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.plugin.ActivePlugin diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt index 1a4f6c9127..9a1a9d975c 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt @@ -20,9 +20,9 @@ import info.nightscout.androidaps.events.EventNewHistoryData import info.nightscout.androidaps.extensions.iobCalc import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.ActionModeHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.BolusCalculatorResult import info.nightscout.database.entities.Carbs diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt index f3fb666d93..8f95aaa5ae 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt @@ -17,9 +17,9 @@ import dagger.android.support.DaggerFragment import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.Translator -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.TherapyEvent import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt index 6d20fb8ab4..25e779c2f5 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt @@ -19,9 +19,9 @@ import info.nightscout.androidaps.extensions.iobCalc import info.nightscout.androidaps.extensions.isInProgress import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.ActionModeHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.ExtendedBolus import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt index ed930c3e6d..be69abf1c7 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt @@ -22,9 +22,9 @@ import info.nightscout.androidaps.events.EventNewHistoryData import info.nightscout.androidaps.extensions.getCustomizedName import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.ActionModeHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.entities.ValueWithUnit diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt index 2e5c63e876..ecdeab5a01 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt @@ -23,9 +23,9 @@ import info.nightscout.androidaps.extensions.lowValueToUnitsToString import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.Translator -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.TemporaryTarget import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt index 491f8c4d3a..0feb98e3a5 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt @@ -20,9 +20,9 @@ import info.nightscout.androidaps.extensions.toStringFull import info.nightscout.androidaps.extensions.toTemporaryBasal import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.ActionModeHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.ExtendedBolus import info.nightscout.database.entities.TemporaryBasal import info.nightscout.database.entities.UserEntry.Action diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt index 921e5829cd..631802be38 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt @@ -14,9 +14,9 @@ import androidx.recyclerview.widget.RecyclerView import dagger.android.support.DaggerFragment import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt index dc2f735e6d..13401515fc 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt @@ -9,7 +9,6 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DecimalFormatter @@ -19,6 +18,7 @@ import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BO import info.nightscout.core.profile.toMgdl import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.extensions.formatColor import info.nightscout.database.entities.TemporaryTarget import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/ExtendedBolusDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/ExtendedBolusDialog.kt index 97c1806957..c96da8feb0 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/ExtendedBolusDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/ExtendedBolusDialog.kt @@ -7,11 +7,11 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.extensions.formatColor import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit import info.nightscout.interfaces.constraints.Constraint diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/FillDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/FillDialog.kt index 7981511ef8..476a8e058b 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/FillDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/FillDialog.kt @@ -7,12 +7,12 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.extensions.formatColor import info.nightscout.database.entities.TherapyEvent import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/InsulinDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/InsulinDialog.kt index 0ef22c20da..ede241bce6 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/InsulinDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/InsulinDialog.kt @@ -9,16 +9,15 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.DefaultValueHelper -import info.nightscout.ui.extensions.toSignedString import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.core.profile.toMgdl import info.nightscout.core.pump.insertBolusTransaction import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.extensions.formatColor import info.nightscout.database.entities.TemporaryTarget import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit @@ -44,6 +43,7 @@ import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.utils.T import info.nightscout.ui.R import info.nightscout.ui.databinding.DialogInsulinBinding +import info.nightscout.ui.extensions.toSignedString import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/LoopDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/LoopDialog.kt index a7b6270c93..83442c6064 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/LoopDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/LoopDialog.kt @@ -13,9 +13,9 @@ import androidx.fragment.app.FragmentManager import dagger.android.support.DaggerDialogFragment import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.OfflineEvent import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/TempBasalDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/TempBasalDialog.kt index 4b3b16dfd1..51febe4abf 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/TempBasalDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/TempBasalDialog.kt @@ -7,11 +7,11 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.extensions.formatColor import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit import info.nightscout.interfaces.constraints.Constraint diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/TreatmentDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/TreatmentDialog.kt index 8a10b73736..96b4188fbf 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/TreatmentDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/TreatmentDialog.kt @@ -9,7 +9,6 @@ import android.view.View import android.view.ViewGroup import com.google.common.base.Joiner import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.protection.ProtectionCheck @@ -17,6 +16,7 @@ import info.nightscout.core.pump.insertBolusTransaction import info.nightscout.core.pump.insertCarbsTransaction import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.extensions.formatColor import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit import info.nightscout.database.impl.AppRepository diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/WizardDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/WizardDialog.kt index bb81a7f4b0..4620272696 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/WizardDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/WizardDialog.kt @@ -19,15 +19,15 @@ import androidx.fragment.app.FragmentManager import dagger.android.HasAndroidInjector import dagger.android.support.DaggerDialogFragment import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.extensions.valueToUnits import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.iob.round import info.nightscout.core.profile.toMgdl import info.nightscout.core.profile.toUnitsString import info.nightscout.core.ui.toast.ToastUtils +import info.nightscout.core.utils.extensions.formatColor +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.core.wizard.BolusWizard import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper diff --git a/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index c967ecfb6c..1bbcde30f4 100644 --- a/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -5,8 +5,8 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.extensions.pureProfileFromJson -import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.core.profile.ProfileStoreObject +import info.nightscout.core.utils.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.entities.embedments.InsulinConfiguration import info.nightscout.interfaces.Config