diff --git a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt index a666b777c7..29bfbb5acb 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt @@ -10,8 +10,6 @@ import com.google.android.material.tabs.TabLayout import com.google.common.collect.Lists import info.nightscout.androidaps.R import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.data.PureProfile -import info.nightscout.database.impl.AppRepository import info.nightscout.androidaps.databinding.ActivityProfilehelperBinding import info.nightscout.androidaps.dialogs.ProfileViewerDialog import info.nightscout.androidaps.interfaces.ActivePlugin @@ -21,6 +19,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.database.entities.EffectiveProfileSwitch +import info.nightscout.database.impl.AppRepository +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.plugins.profile.ProfilePlugin import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.events.EventLocalProfileChanged diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt index 6d444dcb8b..0d9959f35d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt @@ -6,7 +6,6 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.APS import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.BgSource -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileSource import info.nightscout.androidaps.interfaces.Pump import info.nightscout.androidaps.interfaces.PumpSync @@ -18,6 +17,7 @@ import info.nightscout.database.entities.UserEntry.Action import info.nightscout.database.entities.UserEntry.Sources import info.nightscout.database.entities.ValueWithUnit import info.nightscout.interfaces.ConfigBuilder +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt index 2db9134fcb..54799844d5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt @@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.configBuilder import info.nightscout.androidaps.interfaces.APS import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.BgSource -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileSource import info.nightscout.androidaps.interfaces.Pump @@ -11,6 +10,7 @@ import info.nightscout.androidaps.interfaces.Sensitivity import info.nightscout.interfaces.Config import info.nightscout.interfaces.Overview import info.nightscout.interfaces.constraints.Safety +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginType import info.nightscout.interfaces.sync.NsClient diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt b/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt index feb2c409e8..1e0e2f4d11 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt @@ -23,6 +23,7 @@ import info.nightscout.database.entities.embedments.InterfaceIDs import info.nightscout.interfaces.Config import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.notifications.Notification +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.rx.bus.RxBus import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.utils.DateUtil diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/data/Sms.kt b/core/core-main/src/main/java/info/nightscout/androidaps/data/Sms.kt deleted file mode 100644 index f252fa6ef7..0000000000 --- a/core/core-main/src/main/java/info/nightscout/androidaps/data/Sms.kt +++ /dev/null @@ -1,2 +0,0 @@ -package info.nightscout.androidaps.data - diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/BolusExtension.kt b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/BolusExtension.kt index 3ff4d80b33..1354b7a890 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/BolusExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/BolusExtension.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.extensions import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.database.entities.Bolus +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.iob.Iob fun Bolus.iobCalc(activePlugin: ActivePlugin, time: Long, dia: Double): Iob { diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ExtendedBolusExtension.kt b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ExtendedBolusExtension.kt index c0838d5cb7..a1582d04ae 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ExtendedBolusExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ExtendedBolusExtension.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.extensions -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal @@ -8,6 +7,7 @@ import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.ExtendedBolus import info.nightscout.database.entities.TemporaryBasal import info.nightscout.database.entities.interfaces.end +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.iob.IobTotal import info.nightscout.shared.utils.DateUtil import info.nightscout.shared.utils.T diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt index e4b873ac12..33f9243544 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt @@ -1,13 +1,13 @@ package info.nightscout.androidaps.utils.extensions import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.data.PureProfile import info.nightscout.androidaps.extensions.blockFromJsonArray import info.nightscout.androidaps.extensions.targetBlockFromJsonArray import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal import info.nightscout.database.entities.ProfileSwitch import info.nightscout.interfaces.Constants import info.nightscout.interfaces.GlucoseUnit +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.interfaces.utils.JsonHelper import info.nightscout.shared.utils.DateUtil import info.nightscout.shared.utils.T diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/TemporaryBasalExtension.kt b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/TemporaryBasalExtension.kt index 229b6e3d01..a8b4e56c16 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/TemporaryBasalExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/TemporaryBasalExtension.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.extensions -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.utils.DecimalFormatter.to0Decimal @@ -8,6 +7,7 @@ import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.TemporaryBasal import info.nightscout.database.entities.interfaces.end +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.iob.IobTotal import info.nightscout.shared.utils.DateUtil import info.nightscout.shared.utils.T diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ActivePlugin.kt b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ActivePlugin.kt index e3ecd0741a..ff457dfa41 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ActivePlugin.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ActivePlugin.kt @@ -2,6 +2,7 @@ package info.nightscout.androidaps.interfaces import info.nightscout.interfaces.Overview import info.nightscout.interfaces.constraints.Safety +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginType import info.nightscout.interfaces.sync.NsClient diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt index 2fba1bfdae..d8ee302e25 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt @@ -1,16 +1,16 @@ package info.nightscout.androidaps.interfaces -import info.nightscout.interfaces.Constants -import info.nightscout.androidaps.data.PureProfile -import info.nightscout.shared.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter.to0Decimal import info.nightscout.androidaps.utils.DecimalFormatter.to1Decimal import info.nightscout.androidaps.utils.HardLimits -import info.nightscout.interfaces.utils.Round import info.nightscout.interfaces.Config +import info.nightscout.interfaces.Constants import info.nightscout.interfaces.GlucoseUnit +import info.nightscout.interfaces.profile.PureProfile +import info.nightscout.interfaces.utils.Round import info.nightscout.rx.bus.RxBus import info.nightscout.shared.interfaces.ResourceHelper +import info.nightscout.shared.utils.DateUtil import org.joda.time.DateTime import org.json.JSONObject diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileSource.kt b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileSource.kt index 55a51588b1..cd7b621c7d 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileSource.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileSource.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.interfaces import info.nightscout.interfaces.Constants -import info.nightscout.androidaps.data.PureProfile +import info.nightscout.interfaces.profile.PureProfile import org.json.JSONArray interface ProfileSource { diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt index 364022fefc..d5d940cf30 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt @@ -3,15 +3,15 @@ package info.nightscout.androidaps.interfaces import androidx.collection.ArrayMap import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.data.PureProfile -import info.nightscout.shared.utils.DateUtil import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.extensions.pureProfileFromJson import info.nightscout.interfaces.Config +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.interfaces.utils.JsonHelper import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper +import info.nightscout.shared.utils.DateUtil import org.json.JSONException import org.json.JSONObject import javax.inject.Inject diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/data/IobTotalTest.kt b/core/core-main/src/test/java/info/nightscout/androidaps/data/IobTotalTest.kt index 8855905c53..497fe194c6 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/data/IobTotalTest.kt +++ b/core/core-main/src/test/java/info/nightscout/androidaps/data/IobTotalTest.kt @@ -2,6 +2,12 @@ package info.nightscout.androidaps.data import android.content.Context import info.nightscout.androidaps.TestBase +import info.nightscout.core.iob.combine +import info.nightscout.core.iob.copy +import info.nightscout.core.iob.determineBasalJson +import info.nightscout.core.iob.json +import info.nightscout.core.iob.plus +import info.nightscout.core.iob.round import info.nightscout.interfaces.iob.IobTotal import info.nightscout.shared.utils.DateUtil import org.junit.Assert @@ -14,8 +20,8 @@ class IobTotalTest : TestBase() { @Mock lateinit var context: Context - lateinit var dateUtil: DateUtil - var now = 0L + private lateinit var dateUtil: DateUtil + private var now = 0L @Before fun prepare() { diff --git a/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/ProfileStoreTest.kt b/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/ProfileStoreTest.kt index 3c9b826862..d880e0905f 100644 --- a/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/ProfileStoreTest.kt +++ b/core/core-main/src/test/java/info/nightscout/androidaps/interfaces/ProfileStoreTest.kt @@ -1,8 +1,7 @@ package info.nightscout.androidaps.interfaces import info.nightscout.androidaps.TestBaseWithProfile -import info.nightscout.androidaps.data.PureProfile -import org.json.JSONObject +import info.nightscout.interfaces.profile.PureProfile import org.junit.Assert import org.junit.Test diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Insulin.kt b/interfaces/src/main/java/info/nightscout/interfaces/insulin/Insulin.kt similarity index 95% rename from core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Insulin.kt rename to interfaces/src/main/java/info/nightscout/interfaces/insulin/Insulin.kt index 5c5ffdd6b2..eca31317b8 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/interfaces/Insulin.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/insulin/Insulin.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.interfaces +package info.nightscout.interfaces.insulin import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.embedments.InsulinConfiguration diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/data/PureProfile.kt b/interfaces/src/main/java/info/nightscout/interfaces/profile/PureProfile.kt similarity index 92% rename from core/core-main/src/main/java/info/nightscout/androidaps/data/PureProfile.kt rename to interfaces/src/main/java/info/nightscout/interfaces/profile/PureProfile.kt index 112640e877..ef9ffffa66 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/data/PureProfile.kt +++ b/interfaces/src/main/java/info/nightscout/interfaces/profile/PureProfile.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.data +package info.nightscout.interfaces.profile import info.nightscout.database.entities.data.Block import info.nightscout.database.entities.data.TargetBlock diff --git a/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt b/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt index f7433dbe4d..d63acfd0d6 100644 --- a/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt +++ b/plugins/src/main/java/info/nightscout/plugins/configBuilder/RunningConfiguration.kt @@ -1,13 +1,13 @@ package info.nightscout.plugins.configBuilder import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.Sensitivity import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.core.main.R import info.nightscout.interfaces.Config import info.nightscout.interfaces.ConfigBuilder +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.plugin.PluginType import info.nightscout.interfaces.pump.defs.PumpType diff --git a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt index 93bb41e5b9..3f796a26af 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt @@ -4,7 +4,6 @@ import android.view.View import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore @@ -14,6 +13,7 @@ import info.nightscout.database.entities.UserEntry import info.nightscout.database.entities.ValueWithUnit import info.nightscout.interfaces.BuildHelper import info.nightscout.interfaces.autotune.Autotune +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType diff --git a/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt b/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt index 7ee238986e..2ab6cf945f 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt @@ -2,10 +2,8 @@ package info.nightscout.plugins.general.autotune.data import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.data.PureProfile import info.nightscout.androidaps.extensions.blockValueBySeconds import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore @@ -14,6 +12,8 @@ import info.nightscout.core.main.R import info.nightscout.database.entities.data.Block import info.nightscout.interfaces.Config import info.nightscout.interfaces.GlucoseUnit +import info.nightscout.interfaces.insulin.Insulin +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.interfaces.utils.Round import info.nightscout.rx.bus.RxBus import info.nightscout.shared.SafeParse diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/ActivityGraph.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/ActivityGraph.kt index 7a1c3321db..beb9055f23 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/ActivityGraph.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/ActivityGraph.kt @@ -6,8 +6,8 @@ import android.util.AttributeSet import com.jjoe64.graphview.GraphView import com.jjoe64.graphview.series.DataPoint import com.jjoe64.graphview.series.LineGraphSeries -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.database.entities.Bolus +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.shared.utils.T import kotlin.math.floor diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt index 1eec73b2ee..059169e2e1 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt @@ -1,14 +1,14 @@ package info.nightscout.plugins.insulin import dagger.android.HasAndroidInjector -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.interfaces.ResourceHelper import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt index bee4df0a77..5300a7e885 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt @@ -1,13 +1,13 @@ package info.nightscout.plugins.insulin import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.utils.HardLimits import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.embedments.InsulinConfiguration import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.iob.Iob import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.plugin.PluginBase diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt index e98300cb08..903d6143ab 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt @@ -3,14 +3,14 @@ package info.nightscout.plugins.insulin import dagger.android.HasAndroidInjector import info.nightscout.androidaps.extensions.putInt import info.nightscout.androidaps.extensions.storeInt -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt index 1fa1929cd4..fdbd18f2db 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt @@ -1,14 +1,14 @@ package info.nightscout.plugins.insulin import dagger.android.HasAndroidInjector -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.interfaces.ResourceHelper import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt index 43193fd712..740d21eae6 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt @@ -1,14 +1,14 @@ package info.nightscout.plugins.insulin import dagger.android.HasAndroidInjector -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.interfaces.ResourceHelper import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt b/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt index 10427a1a9e..c49635672c 100644 --- a/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt @@ -8,7 +8,6 @@ import androidx.work.workDataOf import dagger.android.HasAndroidInjector import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.data.PureProfile import info.nightscout.androidaps.extensions.blockFromJsonArray import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.Profile @@ -29,6 +28,7 @@ import info.nightscout.interfaces.notifications.Notification import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.interfaces.utils.JsonHelper import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus diff --git a/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotuneCoreTest.kt b/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotuneCoreTest.kt index 71910b1fd7..66b3c4a597 100644 --- a/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotuneCoreTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotuneCoreTest.kt @@ -3,10 +3,10 @@ package info.nightscout.plugins.general.autotune import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBaseWithProfile import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.data.PureProfile import info.nightscout.database.entities.data.Block import info.nightscout.database.entities.data.TargetBlock import info.nightscout.interfaces.GlucoseUnit +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.interfaces.utils.JsonHelper import info.nightscout.plugins.R import info.nightscout.plugins.general.autotune.data.ATProfile diff --git a/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt b/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt index 400405ed3c..d571db34fa 100644 --- a/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt @@ -3,7 +3,6 @@ package info.nightscout.plugins.general.autotune import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBaseWithProfile import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.data.PureProfile import info.nightscout.androidaps.extensions.shiftBlock import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.database.entities.Bolus @@ -14,6 +13,7 @@ import info.nightscout.database.entities.data.TargetBlock import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.iob.IobTotal +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.interfaces.utils.JsonHelper import info.nightscout.plugins.R import info.nightscout.plugins.general.autotune.data.ATProfile diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt index bd285c2499..04ea3c601f 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt @@ -2,14 +2,14 @@ package info.nightscout.plugins.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.interfaces.ResourceHelper import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt index 3df05ad905..712a324645 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt @@ -2,12 +2,12 @@ package info.nightscout.plugins.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.utils.HardLimits import info.nightscout.database.entities.Bolus import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constants +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt index fb11a045dc..b637b05f7b 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt @@ -3,13 +3,13 @@ package info.nightscout.plugins.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus +import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert.assertEquals import org.junit.Before diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt index 20e20fd41f..19821a2fc5 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt @@ -2,14 +2,14 @@ package info.nightscout.plugins.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.interfaces.ResourceHelper import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt index 72cd7b7702..7ca00cd442 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt @@ -2,14 +2,14 @@ package info.nightscout.plugins.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.interfaces.Config -import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.interfaces.Config +import info.nightscout.interfaces.insulin.Insulin import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.interfaces.ResourceHelper import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule diff --git a/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfile.kt b/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfile.kt index a3d4033636..1fd363c373 100644 --- a/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfile.kt +++ b/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfile.kt @@ -1,14 +1,16 @@ package info.nightscout.ui.defaultProfile -import info.nightscout.androidaps.data.PureProfile +import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.utils.extensions.pureProfileFromJson import info.nightscout.interfaces.GlucoseUnit -import info.nightscout.androidaps.interfaces.Profile -import info.nightscout.shared.utils.DateUtil +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.interfaces.utils.Round +import info.nightscout.shared.utils.DateUtil import org.json.JSONArray import org.json.JSONObject -import java.util.* +import java.util.Locale +import java.util.TimeZone +import java.util.TreeMap import javax.inject.Inject import javax.inject.Singleton import kotlin.math.abs diff --git a/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfileDPV.kt b/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfileDPV.kt index af3bf2b95c..9d0f0ea1fb 100644 --- a/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfileDPV.kt +++ b/ui/src/main/java/info/nightscout/ui/defaultProfile/DefaultProfileDPV.kt @@ -1,14 +1,15 @@ package info.nightscout.ui.defaultProfile import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.data.PureProfile +import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.utils.extensions.pureProfileFromJson import info.nightscout.interfaces.GlucoseUnit -import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.interfaces.profile.PureProfile import info.nightscout.shared.utils.DateUtil import org.json.JSONArray import org.json.JSONObject -import java.util.* +import java.util.Locale +import java.util.TimeZone import javax.inject.Inject import javax.inject.Singleton