Clean Imports and add missing Sources in existing uel
This commit is contained in:
parent
21f382f0ae
commit
ab0c739281
|
@ -2,7 +2,7 @@ package info.nightscout.androidaps.activities
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
import info.nightscout.androidaps.databinding.ActivityStatsBinding
|
import info.nightscout.androidaps.databinding.ActivityStatsBinding
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ActivityMonitor
|
import info.nightscout.androidaps.utils.ActivityMonitor
|
||||||
|
|
|
@ -10,7 +10,9 @@ import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.data.Profile
|
import info.nightscout.androidaps.data.Profile
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.DialogCalibrationBinding
|
import info.nightscout.androidaps.databinding.DialogCalibrationBinding
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
|
|
|
@ -16,7 +16,10 @@ import info.nightscout.androidaps.data.Profile
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.TherapyEvent
|
import info.nightscout.androidaps.database.entities.TherapyEvent
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InsertIfNewByTimestampTherapyEventTransaction
|
import info.nightscout.androidaps.database.transactions.InsertIfNewByTimestampTherapyEventTransaction
|
||||||
import info.nightscout.androidaps.databinding.DialogCareBinding
|
import info.nightscout.androidaps.databinding.DialogCareBinding
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
|
|
|
@ -9,7 +9,10 @@ import com.google.common.base.Joiner
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.DialogExtendedbolusBinding
|
import info.nightscout.androidaps.databinding.DialogExtendedbolusBinding
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||||
|
|
|
@ -12,7 +12,10 @@ import info.nightscout.androidaps.data.DetailedBolusInfo
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.TherapyEvent
|
import info.nightscout.androidaps.database.entities.TherapyEvent
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InsertIfNewByTimestampTherapyEventTransaction
|
import info.nightscout.androidaps.database.transactions.InsertIfNewByTimestampTherapyEventTransaction
|
||||||
import info.nightscout.androidaps.databinding.DialogFillBinding
|
import info.nightscout.androidaps.databinding.DialogFillBinding
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
|
|
|
@ -17,7 +17,10 @@ import info.nightscout.androidaps.data.Profile
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InsertTemporaryTargetAndCancelCurrentTransaction
|
import info.nightscout.androidaps.database.transactions.InsertTemporaryTargetAndCancelCurrentTransaction
|
||||||
import info.nightscout.androidaps.databinding.DialogInsulinBinding
|
import info.nightscout.androidaps.databinding.DialogInsulinBinding
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
|
|
|
@ -13,7 +13,10 @@ import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.DialogLoopBinding
|
import info.nightscout.androidaps.databinding.DialogLoopBinding
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange
|
import info.nightscout.androidaps.events.EventPreferenceChange
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||||
|
|
|
@ -9,7 +9,10 @@ import com.google.common.base.Joiner
|
||||||
import info.nightscout.androidaps.Constants
|
import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.DialogProfileswitchBinding
|
import info.nightscout.androidaps.databinding.DialogProfileswitchBinding
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
|
|
|
@ -9,7 +9,10 @@ import com.google.common.base.Joiner
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.DialogTempbasalBinding
|
import info.nightscout.androidaps.databinding.DialogTempbasalBinding
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||||
|
|
|
@ -14,7 +14,10 @@ import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.ValueWrapper
|
import info.nightscout.androidaps.database.ValueWrapper
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction
|
import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction
|
||||||
import info.nightscout.androidaps.database.transactions.InsertTemporaryTargetAndCancelCurrentTransaction
|
import info.nightscout.androidaps.database.transactions.InsertTemporaryTargetAndCancelCurrentTransaction
|
||||||
import info.nightscout.androidaps.databinding.DialogTemptargetBinding
|
import info.nightscout.androidaps.databinding.DialogTemptargetBinding
|
||||||
|
|
|
@ -14,7 +14,10 @@ import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||||
import info.nightscout.androidaps.data.DetailedBolusInfo
|
import info.nightscout.androidaps.data.DetailedBolusInfo
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.DialogTreatmentBinding
|
import info.nightscout.androidaps.databinding.DialogTreatmentBinding
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||||
|
|
|
@ -17,7 +17,10 @@ import info.nightscout.androidaps.data.Profile
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.TherapyEvent
|
import info.nightscout.androidaps.database.entities.TherapyEvent
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InsertTherapyEventAnnouncementTransaction
|
import info.nightscout.androidaps.database.transactions.InsertTherapyEventAnnouncementTransaction
|
||||||
import info.nightscout.androidaps.database.transactions.InsertIfNewByTimestampTherapyEventTransaction
|
import info.nightscout.androidaps.database.transactions.InsertIfNewByTimestampTherapyEventTransaction
|
||||||
import info.nightscout.androidaps.events.EventAcceptOpenLoopChange
|
import info.nightscout.androidaps.events.EventAcceptOpenLoopChange
|
||||||
|
|
|
@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.configBuilder
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
import info.nightscout.androidaps.events.EventAppInitialized
|
import info.nightscout.androidaps.events.EventAppInitialized
|
||||||
import info.nightscout.androidaps.events.EventConfigBuilderChange
|
import info.nightscout.androidaps.events.EventConfigBuilderChange
|
||||||
import info.nightscout.androidaps.events.EventRebuildTabs
|
import info.nightscout.androidaps.events.EventRebuildTabs
|
||||||
|
|
|
@ -17,7 +17,10 @@ import androidx.recyclerview.widget.LinearSmoothScroller
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.ObjectivesFragmentBinding
|
import info.nightscout.androidaps.databinding.ObjectivesFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.ObjectivesItemBinding
|
import info.nightscout.androidaps.databinding.ObjectivesItemBinding
|
||||||
|
@ -310,7 +313,9 @@ class ObjectivesFragment : DaggerFragment() {
|
||||||
activity?.let { activity ->
|
activity?.let { activity ->
|
||||||
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.objectives), resourceHelper.gs(R.string.doyouwantresetstart), Runnable {
|
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.objectives), resourceHelper.gs(R.string.doyouwantresetstart), Runnable {
|
||||||
//uel.log(Action.OBJECTIVE_UNSTARTED, XXXValueWithUnit.SimpleInt(position + 1))
|
//uel.log(Action.OBJECTIVE_UNSTARTED, XXXValueWithUnit.SimpleInt(position + 1))
|
||||||
uel.log(Action.OBJECTIVE_UNSTARTED, ValueWithUnit(position + 1, Units.None))
|
uel.log(Action.OBJECTIVE_UNSTARTED,
|
||||||
|
ValueWithUnit(Sources.Objectives),
|
||||||
|
ValueWithUnit(position + 1, Units.None))
|
||||||
objective.startedOn = 0
|
objective.startedOn = 0
|
||||||
scrollToCurrentObjective()
|
scrollToCurrentObjective()
|
||||||
rxBus.send(EventObjectivesUpdateGui())
|
rxBus.send(EventObjectivesUpdateGui())
|
||||||
|
|
|
@ -7,7 +7,9 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.BuildConfig
|
import info.nightscout.androidaps.BuildConfig
|
||||||
import info.nightscout.androidaps.Config
|
import info.nightscout.androidaps.Config
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.interfaces.*
|
import info.nightscout.androidaps.interfaces.*
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
|
@ -143,7 +145,7 @@ class ObjectivesPlugin @Inject constructor(
|
||||||
sp.putLong("Objectives_" + "auto" + "_accomplished", DateUtil.now())
|
sp.putLong("Objectives_" + "auto" + "_accomplished", DateUtil.now())
|
||||||
setupObjectives()
|
setupObjectives()
|
||||||
OKDialog.show(activity, resourceHelper.gs(R.string.objectives), resourceHelper.gs(R.string.codeaccepted))
|
OKDialog.show(activity, resourceHelper.gs(R.string.objectives), resourceHelper.gs(R.string.codeaccepted))
|
||||||
uel.log(Action.OBJECTIVES_SKIPPED)
|
uel.log(Action.OBJECTIVES_SKIPPED, ValueWithUnit(Sources.Objectives))
|
||||||
} else {
|
} else {
|
||||||
OKDialog.show(activity, resourceHelper.gs(R.string.objectives), resourceHelper.gs(R.string.codeinvalid))
|
OKDialog.show(activity, resourceHelper.gs(R.string.objectives), resourceHelper.gs(R.string.codeinvalid))
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,9 @@ import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||||
import info.nightscout.androidaps.activities.TDDStatsActivity
|
import info.nightscout.androidaps.activities.TDDStatsActivity
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.dialogs.*
|
import info.nightscout.androidaps.dialogs.*
|
||||||
import info.nightscout.androidaps.events.*
|
import info.nightscout.androidaps.events.*
|
||||||
import info.nightscout.androidaps.historyBrowser.HistoryBrowseActivity
|
import info.nightscout.androidaps.historyBrowser.HistoryBrowseActivity
|
||||||
|
|
|
@ -16,7 +16,9 @@ import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.Food
|
import info.nightscout.androidaps.database.entities.Food
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateFoodTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateFoodTransaction
|
||||||
import info.nightscout.androidaps.databinding.FoodFragmentBinding
|
import info.nightscout.androidaps.databinding.FoodFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.FoodItemBinding
|
import info.nightscout.androidaps.databinding.FoodItemBinding
|
||||||
|
|
|
@ -16,7 +16,9 @@ import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.activities.DaggerAppCompatActivityWithResult
|
import info.nightscout.androidaps.activities.DaggerAppCompatActivityWithResult
|
||||||
import info.nightscout.androidaps.activities.PreferencesActivity
|
import info.nightscout.androidaps.activities.PreferencesActivity
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.events.EventAppExit
|
import info.nightscout.androidaps.events.EventAppExit
|
||||||
import info.nightscout.androidaps.interfaces.ConfigInterface
|
import info.nightscout.androidaps.interfaces.ConfigInterface
|
||||||
import info.nightscout.androidaps.interfaces.ImportExportPrefsInterface
|
import info.nightscout.androidaps.interfaces.ImportExportPrefsInterface
|
||||||
|
@ -348,7 +350,7 @@ class ImportExportPrefs @Inject constructor(
|
||||||
private fun restartAppAfterImport(context: Context) {
|
private fun restartAppAfterImport(context: Context) {
|
||||||
sp.putBoolean(R.string.key_setupwizard_processed, true)
|
sp.putBoolean(R.string.key_setupwizard_processed, true)
|
||||||
OKDialog.show(context, resourceHelper.gs(R.string.setting_imported), resourceHelper.gs(R.string.restartingapp)) {
|
OKDialog.show(context, resourceHelper.gs(R.string.setting_imported), resourceHelper.gs(R.string.restartingapp)) {
|
||||||
uel.log(Action.IMPORT_SETTINGS)
|
uel.log(Action.IMPORT_SETTINGS, ValueWithUnit(Sources.Maintenance))
|
||||||
log.debug(LTag.CORE, "Exiting")
|
log.debug(LTag.CORE, "Exiting")
|
||||||
rxBus.send(EventAppExit())
|
rxBus.send(EventAppExit())
|
||||||
if (context is AppCompatActivity) {
|
if (context is AppCompatActivity) {
|
||||||
|
|
|
@ -8,7 +8,10 @@ import android.view.ViewGroup
|
||||||
import android.widget.ScrollView
|
import android.widget.ScrollView
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.NsClientFragmentBinding
|
import info.nightscout.androidaps.databinding.NsClientFragmentBinding
|
||||||
import info.nightscout.androidaps.interfaces.DataSyncSelector
|
import info.nightscout.androidaps.interfaces.DataSyncSelector
|
||||||
import info.nightscout.androidaps.interfaces.UploadQueueAdminInterface
|
import info.nightscout.androidaps.interfaces.UploadQueueAdminInterface
|
||||||
|
@ -61,7 +64,7 @@ class NSClientFragment : DaggerFragment() {
|
||||||
|
|
||||||
binding.paused.isChecked = nsClientPlugin.paused
|
binding.paused.isChecked = nsClientPlugin.paused
|
||||||
binding.paused.setOnCheckedChangeListener { _, isChecked ->
|
binding.paused.setOnCheckedChangeListener { _, isChecked ->
|
||||||
uel.log(if (isChecked) UserEntry.Action.NS_PAUSED else UserEntry.Action.NS_RESUME)
|
uel.log(if (isChecked) Action.NS_PAUSED else Action.NS_RESUME, ValueWithUnit(Sources.NSClient))
|
||||||
nsClientPlugin.pause(isChecked)
|
nsClientPlugin.pause(isChecked)
|
||||||
updateGui()
|
updateGui()
|
||||||
}
|
}
|
||||||
|
@ -74,7 +77,7 @@ class NSClientFragment : DaggerFragment() {
|
||||||
binding.clearQueue.setOnClickListener {
|
binding.clearQueue.setOnClickListener {
|
||||||
context?.let { context ->
|
context?.let { context ->
|
||||||
OKDialog.showConfirmation(context, resourceHelper.gs(R.string.nsclientinternal), resourceHelper.gs(R.string.clearqueueconfirm), Runnable {
|
OKDialog.showConfirmation(context, resourceHelper.gs(R.string.nsclientinternal), resourceHelper.gs(R.string.clearqueueconfirm), Runnable {
|
||||||
uel.log(UserEntry.Action.NS_QUEUE_CLEARED)
|
uel.log(Action.NS_QUEUE_CLEARED, ValueWithUnit(Sources.NSClient))
|
||||||
uploadQueue.clearQueue()
|
uploadQueue.clearQueue()
|
||||||
updateGui()
|
updateGui()
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,7 +24,6 @@ import dagger.android.HasAndroidInjector;
|
||||||
import info.nightscout.androidaps.Config;
|
import info.nightscout.androidaps.Config;
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*;
|
|
||||||
import info.nightscout.androidaps.events.EventAppExit;
|
import info.nightscout.androidaps.events.EventAppExit;
|
||||||
import info.nightscout.androidaps.events.EventChargingState;
|
import info.nightscout.androidaps.events.EventChargingState;
|
||||||
import info.nightscout.androidaps.events.EventNetworkChange;
|
import info.nightscout.androidaps.events.EventNetworkChange;
|
||||||
|
|
|
@ -83,8 +83,8 @@ class NSClientRemoveWorker(
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
result.invalidated.forEach {
|
result.invalidated.forEach {
|
||||||
uel.log(
|
uel.log(Action.TT_REMOVED,
|
||||||
Action.TT_REMOVED, ValueWithUnit(Sources.NSClient),
|
ValueWithUnit(Sources.NSClient),
|
||||||
ValueWithUnit(it.reason.text, Units.TherapyEvent),
|
ValueWithUnit(it.reason.text, Units.TherapyEvent),
|
||||||
ValueWithUnit(it.lowTarget, Units.Mg_Dl, true),
|
ValueWithUnit(it.lowTarget, Units.Mg_Dl, true),
|
||||||
ValueWithUnit(it.highTarget, Units.Mg_Dl, it.lowTarget != it.highTarget),
|
ValueWithUnit(it.highTarget, Units.Mg_Dl, it.lowTarget != it.highTarget),
|
||||||
|
@ -108,8 +108,7 @@ class NSClientRemoveWorker(
|
||||||
XXXValueWithUnit.Timestamp(it.timestamp),
|
XXXValueWithUnit.Timestamp(it.timestamp),
|
||||||
XXXValueWithUnit.TherapyEventType(it.type))
|
XXXValueWithUnit.TherapyEventType(it.type))
|
||||||
*/
|
*/
|
||||||
uel.log(
|
uel.log(Action.CAREPORTAL_REMOVED, (it.note ?: ""),
|
||||||
Action.CAREPORTAL_REMOVED, (it.note ?: ""),
|
|
||||||
ValueWithUnit(Sources.NSClient),
|
ValueWithUnit(Sources.NSClient),
|
||||||
ValueWithUnit(it.timestamp, Units.Timestamp, true),
|
ValueWithUnit(it.timestamp, Units.Timestamp, true),
|
||||||
ValueWithUnit(it.type.text, Units.TherapyEvent))
|
ValueWithUnit(it.type.text, Units.TherapyEvent))
|
||||||
|
@ -127,8 +126,7 @@ class NSClientRemoveWorker(
|
||||||
.blockingGet()
|
.blockingGet()
|
||||||
.also { result ->
|
.also { result ->
|
||||||
result.invalidated.forEach {
|
result.invalidated.forEach {
|
||||||
uel.log(
|
uel.log(Action.CAREPORTAL_REMOVED,
|
||||||
Action.CAREPORTAL_REMOVED,
|
|
||||||
ValueWithUnit(Sources.NSClient),
|
ValueWithUnit(Sources.NSClient),
|
||||||
ValueWithUnit(it.timestamp, Units.Timestamp, true),
|
ValueWithUnit(it.timestamp, Units.Timestamp, true),
|
||||||
ValueWithUnit(it.amount, Units.U))
|
ValueWithUnit(it.amount, Units.U))
|
||||||
|
@ -145,8 +143,7 @@ class NSClientRemoveWorker(
|
||||||
.blockingGet()
|
.blockingGet()
|
||||||
.also { result ->
|
.also { result ->
|
||||||
result.invalidated.forEach {
|
result.invalidated.forEach {
|
||||||
uel.log(
|
uel.log(Action.CAREPORTAL_REMOVED,
|
||||||
Action.CAREPORTAL_REMOVED,
|
|
||||||
ValueWithUnit(Sources.NSClient),
|
ValueWithUnit(Sources.NSClient),
|
||||||
ValueWithUnit(it.timestamp, Units.Timestamp, true),
|
ValueWithUnit(it.timestamp, Units.Timestamp, true),
|
||||||
ValueWithUnit(it.amount, Units.G))
|
ValueWithUnit(it.amount, Units.G))
|
||||||
|
|
|
@ -14,7 +14,10 @@ import com.google.common.primitives.Ints.min
|
||||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
|
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.ActivitySmscommunicatorOtpBinding
|
import info.nightscout.androidaps.databinding.ActivitySmscommunicatorOtpBinding
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
|
@ -73,7 +76,7 @@ class SmsCommunicatorOtpActivity : NoSplashAppCompatActivity() {
|
||||||
resourceHelper.gs(R.string.smscommunicator_otp_reset_title),
|
resourceHelper.gs(R.string.smscommunicator_otp_reset_title),
|
||||||
resourceHelper.gs(R.string.smscommunicator_otp_reset_prompt),
|
resourceHelper.gs(R.string.smscommunicator_otp_reset_prompt),
|
||||||
Runnable {
|
Runnable {
|
||||||
uel.log(Action.OTP_RESET)
|
uel.log(Action.OTP_RESET, ValueWithUnit(Sources.SMS))
|
||||||
otp.ensureKey(true)
|
otp.ensureKey(true)
|
||||||
updateGui()
|
updateGui()
|
||||||
ToastUtils.Long.infoToast(this, resourceHelper.gs(R.string.smscommunicator_otp_reset_successful))
|
ToastUtils.Long.infoToast(this, resourceHelper.gs(R.string.smscommunicator_otp_reset_successful))
|
||||||
|
@ -89,7 +92,7 @@ class SmsCommunicatorOtpActivity : NoSplashAppCompatActivity() {
|
||||||
val clip = ClipData.newPlainText("OTP Secret", otp.provisioningSecret())
|
val clip = ClipData.newPlainText("OTP Secret", otp.provisioningSecret())
|
||||||
clipboard.primaryClip = clip
|
clipboard.primaryClip = clip
|
||||||
ToastUtils.Long.infoToast(this, resourceHelper.gs(R.string.smscommunicator_otp_export_successful))
|
ToastUtils.Long.infoToast(this, resourceHelper.gs(R.string.smscommunicator_otp_export_successful))
|
||||||
uel.log(Action.OTP_EXPORT)
|
uel.log(Action.OTP_EXPORT, ValueWithUnit(Sources.SMS))
|
||||||
})
|
})
|
||||||
|
|
||||||
true
|
true
|
||||||
|
|
|
@ -12,7 +12,10 @@ import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.Constants
|
import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.data.Profile
|
import info.nightscout.androidaps.data.Profile
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.LocalprofileFragmentBinding
|
import info.nightscout.androidaps.databinding.LocalprofileFragmentBinding
|
||||||
import info.nightscout.androidaps.dialogs.ProfileSwitchDialog
|
import info.nightscout.androidaps.dialogs.ProfileSwitchDialog
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
|
|
|
@ -5,7 +5,6 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.Constants
|
import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.data.Profile
|
import info.nightscout.androidaps.data.Profile
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
|
||||||
import info.nightscout.androidaps.events.EventProfileStoreChanged
|
import info.nightscout.androidaps.events.EventProfileStoreChanged
|
||||||
import info.nightscout.androidaps.interfaces.*
|
import info.nightscout.androidaps.interfaces.*
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
|
|
|
@ -9,7 +9,10 @@ import android.widget.ArrayAdapter
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.NsprofileFragmentBinding
|
import info.nightscout.androidaps.databinding.NsprofileFragmentBinding
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
|
@ -64,7 +67,10 @@ class NSProfileFragment : DaggerFragment() {
|
||||||
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.nsprofile),
|
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.nsprofile),
|
||||||
resourceHelper.gs(R.string.activate_profile) + ": " + name + " ?", Runnable {
|
resourceHelper.gs(R.string.activate_profile) + ": " + name + " ?", Runnable {
|
||||||
//uel.log(Action.PROFILE_SWITCH, XXXValueWithUnit.SimpleString(name), XXXValueWithUnit.Percent(100))
|
//uel.log(Action.PROFILE_SWITCH, XXXValueWithUnit.SimpleString(name), XXXValueWithUnit.Percent(100))
|
||||||
uel.log(Action.PROFILE_SWITCH, ValueWithUnit(name, Units.None), ValueWithUnit(100.toInt(), Units.Percent))
|
uel.log(Action.PROFILE_SWITCH,
|
||||||
|
ValueWithUnit(Sources.NSProfile),
|
||||||
|
ValueWithUnit(name, Units.None),
|
||||||
|
ValueWithUnit(100, Units.Percent))
|
||||||
treatmentsPlugin.doProfileSwitch(store, name, 0, 100, 0, DateUtil.now())
|
treatmentsPlugin.doProfileSwitch(store, name, 0, 100, 0, DateUtil.now())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,10 @@ import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.GlucoseValue
|
import info.nightscout.androidaps.database.entities.GlucoseValue
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateGlucoseValueTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateGlucoseValueTransaction
|
||||||
import info.nightscout.androidaps.databinding.BgsourceFragmentBinding
|
import info.nightscout.androidaps.databinding.BgsourceFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.BgsourceItemBinding
|
import info.nightscout.androidaps.databinding.BgsourceItemBinding
|
||||||
|
@ -131,7 +134,9 @@ class BGSourceFragment : DaggerFragment() {
|
||||||
val text = dateUtil.dateAndTimeString(glucoseValue.timestamp) + "\n" + glucoseValue.valueToUnitsString(profileFunction.getUnits())
|
val text = dateUtil.dateAndTimeString(glucoseValue.timestamp) + "\n" + glucoseValue.valueToUnitsString(profileFunction.getUnits())
|
||||||
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.removerecord), text, Runnable {
|
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.removerecord), text, Runnable {
|
||||||
//uel.log(Action.BG_REMOVED, XXXValueWithUnit.Timestamp(glucoseValue.timestamp))
|
//uel.log(Action.BG_REMOVED, XXXValueWithUnit.Timestamp(glucoseValue.timestamp))
|
||||||
uel.log(Action.BG_REMOVED, ValueWithUnit(glucoseValue.timestamp, Units.Timestamp))
|
uel.log(Action.BG_REMOVED,
|
||||||
|
ValueWithUnit(Sources.BG),
|
||||||
|
ValueWithUnit(glucoseValue.timestamp, Units.Timestamp))
|
||||||
disposable += repository.runTransaction(InvalidateGlucoseValueTransaction(glucoseValue.id)).subscribe()
|
disposable += repository.runTransaction(InvalidateGlucoseValueTransaction(glucoseValue.id)).subscribe()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,10 @@ import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.Bolus
|
import info.nightscout.androidaps.database.entities.Bolus
|
||||||
import info.nightscout.androidaps.database.entities.BolusCalculatorResult
|
import info.nightscout.androidaps.database.entities.BolusCalculatorResult
|
||||||
import info.nightscout.androidaps.database.entities.Carbs
|
import info.nightscout.androidaps.database.entities.Carbs
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateBolusCalculatorResultTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateBolusCalculatorResultTransaction
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateBolusTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateBolusTransaction
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateCarbsTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateCarbsTransaction
|
||||||
|
|
|
@ -12,7 +12,10 @@ import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.TherapyEvent
|
import info.nightscout.androidaps.database.entities.TherapyEvent
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateAAPSStartedTherapyEventTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateAAPSStartedTherapyEventTransaction
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateTherapyEventTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateTherapyEventTransaction
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsCareportalFragmentBinding
|
import info.nightscout.androidaps.databinding.TreatmentsCareportalFragmentBinding
|
||||||
|
|
|
@ -12,7 +12,9 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.data.Intervals
|
import info.nightscout.androidaps.data.Intervals
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsExtendedbolusFragmentBinding
|
import info.nightscout.androidaps.databinding.TreatmentsExtendedbolusFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsExtendedbolusItemBinding
|
import info.nightscout.androidaps.databinding.TreatmentsExtendedbolusItemBinding
|
||||||
import info.nightscout.androidaps.db.ExtendedBolus
|
import info.nightscout.androidaps.db.ExtendedBolus
|
||||||
|
|
|
@ -10,7 +10,10 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsProfileswitchFragmentBinding
|
import info.nightscout.androidaps.databinding.TreatmentsProfileswitchFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsProfileswitchItemBinding
|
import info.nightscout.androidaps.databinding.TreatmentsProfileswitchItemBinding
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch
|
import info.nightscout.androidaps.db.ProfileSwitch
|
||||||
|
|
|
@ -15,7 +15,10 @@ import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.ValueWrapper
|
import info.nightscout.androidaps.database.ValueWrapper
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.interfaces.end
|
import info.nightscout.androidaps.database.interfaces.end
|
||||||
import info.nightscout.androidaps.database.transactions.InvalidateTemporaryTargetTransaction
|
import info.nightscout.androidaps.database.transactions.InvalidateTemporaryTargetTransaction
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsTemptargetFragmentBinding
|
import info.nightscout.androidaps.databinding.TreatmentsTemptargetFragmentBinding
|
||||||
|
|
|
@ -13,7 +13,10 @@ import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.data.Intervals
|
import info.nightscout.androidaps.data.Intervals
|
||||||
import info.nightscout.androidaps.data.IobTotal
|
import info.nightscout.androidaps.data.IobTotal
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsTempbasalsFragmentBinding
|
import info.nightscout.androidaps.databinding.TreatmentsTempbasalsFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsTempbasalsItemBinding
|
import info.nightscout.androidaps.databinding.TreatmentsTempbasalsItemBinding
|
||||||
import info.nightscout.androidaps.db.Source
|
import info.nightscout.androidaps.db.Source
|
||||||
|
|
|
@ -11,7 +11,10 @@ import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsUserEntryFragmentBinding
|
import info.nightscout.androidaps.databinding.TreatmentsUserEntryFragmentBinding
|
||||||
import info.nightscout.androidaps.databinding.TreatmentsUserEntryItemBinding
|
import info.nightscout.androidaps.databinding.TreatmentsUserEntryItemBinding
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange
|
import info.nightscout.androidaps.events.EventPreferenceChange
|
||||||
|
|
|
@ -14,7 +14,10 @@ import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.BolusCalculatorResult
|
import info.nightscout.androidaps.database.entities.BolusCalculatorResult
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InsertOrUpdateBolusCalculatorResultTransaction
|
import info.nightscout.androidaps.database.transactions.InsertOrUpdateBolusCalculatorResultTransaction
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||||
import info.nightscout.androidaps.interfaces.*
|
import info.nightscout.androidaps.interfaces.*
|
||||||
|
|
|
@ -20,7 +20,9 @@ import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.automation.R
|
import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.automation.databinding.AutomationEventItemBinding
|
import info.nightscout.androidaps.automation.databinding.AutomationEventItemBinding
|
||||||
import info.nightscout.androidaps.automation.databinding.AutomationFragmentBinding
|
import info.nightscout.androidaps.automation.databinding.AutomationFragmentBinding
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
import info.nightscout.androidaps.plugins.general.automation.dialogs.EditEventDialog
|
import info.nightscout.androidaps.plugins.general.automation.dialogs.EditEventDialog
|
||||||
|
@ -217,7 +219,7 @@ class AutomationFragment : DaggerFragment(), OnStartDragListener {
|
||||||
holder.binding.iconTrash.setOnClickListener {
|
holder.binding.iconTrash.setOnClickListener {
|
||||||
OKDialog.showConfirmation(requireContext(), resourceHelper.gs(R.string.removerecord) + " " + automationPlugin.at(position).title,
|
OKDialog.showConfirmation(requireContext(), resourceHelper.gs(R.string.removerecord) + " " + automationPlugin.at(position).title,
|
||||||
{
|
{
|
||||||
uel.log(Action.AUTOMATION_REMOVED, automationPlugin.at(position).title)
|
uel.log(Action.AUTOMATION_REMOVED, automationPlugin.at(position).title, ValueWithUnit(Sources.Automation))
|
||||||
automationPlugin.removeAt(position)
|
automationPlugin.removeAt(position)
|
||||||
notifyItemRemoved(position)
|
notifyItemRemoved(position)
|
||||||
}, {
|
}, {
|
||||||
|
@ -240,7 +242,7 @@ class AutomationFragment : DaggerFragment(), OnStartDragListener {
|
||||||
activity?.let { activity ->
|
activity?.let { activity ->
|
||||||
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.removerecord) + " " + automationPlugin.at(position).title,
|
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.removerecord) + " " + automationPlugin.at(position).title,
|
||||||
Runnable {
|
Runnable {
|
||||||
uel.log(Action.AUTOMATION_REMOVED, automationPlugin.at(position).title)
|
uel.log(Action.AUTOMATION_REMOVED, automationPlugin.at(position).title, ValueWithUnit(Sources.Automation))
|
||||||
automationPlugin.removeAt(position)
|
automationPlugin.removeAt(position)
|
||||||
notifyItemRemoved(position)
|
notifyItemRemoved(position)
|
||||||
rxBus.send(EventAutomationDataChanged())
|
rxBus.send(EventAutomationDataChanged())
|
||||||
|
|
|
@ -5,7 +5,8 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.automation.R
|
import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||||
import info.nightscout.androidaps.interfaces.ConfigBuilderInterface
|
import info.nightscout.androidaps.interfaces.ConfigBuilderInterface
|
||||||
|
|
|
@ -5,7 +5,8 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.automation.R
|
import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||||
import info.nightscout.androidaps.interfaces.ConfigBuilderInterface
|
import info.nightscout.androidaps.interfaces.ConfigBuilderInterface
|
||||||
import info.nightscout.androidaps.interfaces.LoopInterface
|
import info.nightscout.androidaps.interfaces.LoopInterface
|
||||||
|
|
|
@ -5,7 +5,8 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.automation.R
|
import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||||
import info.nightscout.androidaps.interfaces.ConfigBuilderInterface
|
import info.nightscout.androidaps.interfaces.ConfigBuilderInterface
|
||||||
import info.nightscout.androidaps.interfaces.LoopInterface
|
import info.nightscout.androidaps.interfaces.LoopInterface
|
||||||
|
|
|
@ -6,7 +6,9 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.automation.R
|
import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||||
import info.nightscout.androidaps.interfaces.LoopInterface
|
import info.nightscout.androidaps.interfaces.LoopInterface
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
|
|
|
@ -6,7 +6,9 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.automation.R
|
import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
import info.nightscout.androidaps.logging.LTag
|
import info.nightscout.androidaps.logging.LTag
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
|
|
|
@ -6,7 +6,9 @@ import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.automation.R
|
import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.general.automation.elements.Comparator
|
import info.nightscout.androidaps.plugins.general.automation.elements.Comparator
|
||||||
|
|
|
@ -10,7 +10,9 @@ import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.InsertTemporaryTargetAndCancelCurrentTransaction
|
import info.nightscout.androidaps.database.transactions.InsertTemporaryTargetAndCancelCurrentTransaction
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
|
|
|
@ -5,10 +5,11 @@ import info.nightscout.androidaps.automation.R
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction
|
import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction
|
||||||
import info.nightscout.androidaps.logging.LTag
|
import info.nightscout.androidaps.logging.LTag
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
|
|
||||||
import info.nightscout.androidaps.queue.Callback
|
import info.nightscout.androidaps.queue.Callback
|
||||||
import info.nightscout.androidaps.utils.DateUtil
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||||
|
@ -32,7 +33,7 @@ class ActionStopTempTarget(injector: HasAndroidInjector) : Action(injector) {
|
||||||
override fun doAction(callback: Callback) {
|
override fun doAction(callback: Callback) {
|
||||||
disposable += repository.runTransactionForResult(CancelCurrentTemporaryTargetIfAnyTransaction(dateUtil._now()))
|
disposable += repository.runTransactionForResult(CancelCurrentTemporaryTargetIfAnyTransaction(dateUtil._now()))
|
||||||
.subscribe({ result ->
|
.subscribe({ result ->
|
||||||
uel.log(UserEntry.Action.CANCEL_TT, UserEntry.ValueWithUnit(UserEntry.Sources.Automation))
|
uel.log(UserEntry.Action.CANCEL_TT, ValueWithUnit(Sources.Automation))
|
||||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated temp target $it") }
|
||||||
}, {
|
}, {
|
||||||
aapsLogger.error(LTag.DATABASE, "Error while saving temporary target", it)
|
aapsLogger.error(LTag.DATABASE, "Error while saving temporary target", it)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.androidaps;
|
package info.nightscout.androidaps;
|
||||||
|
|
||||||
import info.nightscout.androidaps.utils.T;
|
import info.nightscout.androidaps.utils.T;
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*;
|
import info.nightscout.androidaps.database.entities.UserEntry.Units;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 07.06.2016.
|
* Created by mike on 07.06.2016.
|
||||||
|
|
|
@ -11,11 +11,15 @@ import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
import info.nightscout.androidaps.activities.ErrorHelperActivity
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.androidaps.core.R
|
||||||
import info.nightscout.androidaps.core.databinding.DialogErrorBinding
|
import info.nightscout.androidaps.core.databinding.DialogErrorBinding
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.services.AlarmSoundServiceHelper
|
import info.nightscout.androidaps.services.AlarmSoundServiceHelper
|
||||||
import info.nightscout.androidaps.utils.T
|
import info.nightscout.androidaps.utils.T
|
||||||
|
import org.mozilla.javascript.tools.jsc.Main
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class ErrorDialog : DaggerDialogFragment() {
|
class ErrorDialog : DaggerDialogFragment() {
|
||||||
|
@ -59,15 +63,15 @@ class ErrorDialog : DaggerDialogFragment() {
|
||||||
|
|
||||||
binding.title.text = title
|
binding.title.text = title
|
||||||
binding.ok.setOnClickListener {
|
binding.ok.setOnClickListener {
|
||||||
uel.log(Action.ERROR_DIALOG_OK)
|
uel.log(Action.ERROR_DIALOG_OK, ValueWithUnit(Sources.Maintenance))
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
binding.mute.setOnClickListener {
|
binding.mute.setOnClickListener {
|
||||||
uel.log(Action.ERROR_DIALOG_MUTE)
|
uel.log(Action.ERROR_DIALOG_MUTE, ValueWithUnit(Sources.Maintenance))
|
||||||
stopAlarm()
|
stopAlarm()
|
||||||
}
|
}
|
||||||
binding.mute5min.setOnClickListener {
|
binding.mute5min.setOnClickListener {
|
||||||
uel.log(Action.ERROR_DIALOG_MUTE_5MIN)
|
uel.log(Action.ERROR_DIALOG_MUTE_5MIN, ValueWithUnit(Sources.Maintenance))
|
||||||
stopAlarm()
|
stopAlarm()
|
||||||
loopHandler.postDelayed(this::startAlarm, T.mins(5).msecs())
|
loopHandler.postDelayed(this::startAlarm, T.mins(5).msecs())
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,8 @@ package info.nightscout.androidaps.logging
|
||||||
|
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.database.transactions.UserEntryTransaction
|
import info.nightscout.androidaps.database.transactions.UserEntryTransaction
|
||||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||||
import io.reactivex.disposables.CompositeDisposable
|
import io.reactivex.disposables.CompositeDisposable
|
||||||
|
|
|
@ -3,7 +3,8 @@ package info.nightscout.androidaps.plugins.general.maintenance.formats
|
||||||
import info.nightscout.androidaps.Constants
|
import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.androidaps.core.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
import info.nightscout.androidaps.utils.DateUtil
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
|
|
|
@ -3,7 +3,10 @@ package info.nightscout.androidaps.utils
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.androidaps.core.R
|
||||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||||
import info.nightscout.androidaps.database.entities.TherapyEvent
|
import info.nightscout.androidaps.database.entities.TherapyEvent
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
|
|
@ -5,7 +5,10 @@ import dagger.Reusable
|
||||||
import info.nightscout.androidaps.Constants
|
import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.androidaps.core.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ColorGroup
|
||||||
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
import info.nightscout.androidaps.database.entities.XXXValueWithUnit
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||||
|
@ -53,10 +56,13 @@ class UserEntryPresentationHelper @Inject constructor(
|
||||||
Sources.Announcement -> R.drawable.ic_cp_announcement
|
Sources.Announcement -> R.drawable.ic_cp_announcement
|
||||||
Sources.Actions -> R.drawable.ic_action
|
Sources.Actions -> R.drawable.ic_action
|
||||||
Sources.Automation -> R.drawable.ic_automation
|
Sources.Automation -> R.drawable.ic_automation
|
||||||
|
Sources.BG -> R.drawable.ic_generic_cgm
|
||||||
Sources.LocalProfile -> R.drawable.ic_local_profile
|
Sources.LocalProfile -> R.drawable.ic_local_profile
|
||||||
Sources.Loop -> R.drawable.ic_loop_closed_white
|
Sources.Loop -> R.drawable.ic_loop_closed_white
|
||||||
Sources.Maintenance -> R.drawable.ic_maintenance
|
Sources.Maintenance -> R.drawable.ic_maintenance
|
||||||
Sources.NSClient -> R.drawable.ic_nightscout_syncs
|
Sources.NSClient -> R.drawable.ic_nightscout_syncs
|
||||||
|
Sources.NSProfile -> R.drawable.ic_nightscout_profile
|
||||||
|
Sources.Objectives -> R.drawable.ic_graduation
|
||||||
Sources.Pump -> R.drawable.ic_generic_icon
|
Sources.Pump -> R.drawable.ic_generic_icon
|
||||||
Sources.SMS -> R.drawable.ic_sms
|
Sources.SMS -> R.drawable.ic_sms
|
||||||
Sources.Treatments -> R.drawable.ic_treatments
|
Sources.Treatments -> R.drawable.ic_treatments
|
||||||
|
|
|
@ -10,7 +10,10 @@ import android.view.ViewGroup
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.activities.TDDStatsActivity
|
import info.nightscout.androidaps.activities.TDDStatsActivity
|
||||||
import info.nightscout.androidaps.dana.databinding.DanarFragmentBinding
|
import info.nightscout.androidaps.dana.databinding.DanarFragmentBinding
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import info.nightscout.androidaps.dialogs.ProfileViewerDialog
|
import info.nightscout.androidaps.dialogs.ProfileViewerDialog
|
||||||
import info.nightscout.androidaps.events.EventExtendedBolusChange
|
import info.nightscout.androidaps.events.EventExtendedBolusChange
|
||||||
import info.nightscout.androidaps.events.EventInitializationChanged
|
import info.nightscout.androidaps.events.EventInitializationChanged
|
||||||
|
@ -109,7 +112,7 @@ class DanaFragment : DaggerFragment() {
|
||||||
binding.btconnection.setOnLongClickListener {
|
binding.btconnection.setOnLongClickListener {
|
||||||
activity?.let {
|
activity?.let {
|
||||||
OKDialog.showConfirmation(it, resourceHelper.gs(R.string.resetpairing)) {
|
OKDialog.showConfirmation(it, resourceHelper.gs(R.string.resetpairing)) {
|
||||||
uel.log(UserEntry.Action.CLEAR_PAIRING_KEYS)
|
uel.log(Action.CLEAR_PAIRING_KEYS, ValueWithUnit(Sources.Pump))
|
||||||
(activePlugin.activePump as DanaPumpInterface).clearPairing()
|
(activePlugin.activePump as DanaPumpInterface).clearPairing()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,9 @@ import info.nightscout.androidaps.database.data.Block
|
||||||
import info.nightscout.androidaps.database.data.TargetBlock
|
import info.nightscout.androidaps.database.data.TargetBlock
|
||||||
import info.nightscout.androidaps.database.embedments.InterfaceIDs
|
import info.nightscout.androidaps.database.embedments.InterfaceIDs
|
||||||
import info.nightscout.androidaps.database.entities.*
|
import info.nightscout.androidaps.database.entities.*
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Units
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
|
|
|
@ -157,10 +157,13 @@ data class UserEntry(
|
||||||
Announcement,
|
Announcement,
|
||||||
Actions, //From Actions plugin
|
Actions, //From Actions plugin
|
||||||
Automation, //From Automation plugin
|
Automation, //From Automation plugin
|
||||||
|
BG, // From BG plugin
|
||||||
LocalProfile, //From LocalProfile plugin
|
LocalProfile, //From LocalProfile plugin
|
||||||
Loop, //From Loop plugin
|
Loop, //From Loop plugin
|
||||||
Maintenance, //From Maintenance plugin
|
Maintenance, //From Maintenance plugin
|
||||||
NSClient, //From NSClient plugin
|
NSClient, //From NSClient plugin
|
||||||
|
NSProfile, //From NSProfile plugin
|
||||||
|
Objectives, //From Objectives plugin
|
||||||
Pump, //From Pump plugin
|
Pump, //From Pump plugin
|
||||||
SMS, //From SMS plugin
|
SMS, //From SMS plugin
|
||||||
Treatments, //From Treatments plugin
|
Treatments, //From Treatments plugin
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package info.nightscout.androidaps.database.transactions
|
package info.nightscout.androidaps.database.transactions
|
||||||
|
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry
|
import info.nightscout.androidaps.database.entities.UserEntry
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
|
||||||
|
|
||||||
class UserEntryTransaction(
|
class UserEntryTransaction(
|
||||||
val action: Action,
|
val action: Action,
|
||||||
|
|
Loading…
Reference in a new issue