ToastUtils -> :core:ui
This commit is contained in:
parent
d8bfcad7e9
commit
a2f048adc4
|
@ -27,12 +27,12 @@ import info.nightscout.androidaps.activities.PreferencesActivity
|
||||||
import info.nightscout.androidaps.diaconn.events.EventDiaconnG8PumpLogReset
|
import info.nightscout.androidaps.diaconn.events.EventDiaconnG8PumpLogReset
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.formats.EncryptedPrefsFormat
|
import info.nightscout.androidaps.plugins.general.maintenance.formats.EncryptedPrefsFormat
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.alertDialogs.PrefImportSummaryDialog
|
import info.nightscout.androidaps.utils.alertDialogs.PrefImportSummaryDialog
|
||||||
import info.nightscout.androidaps.utils.protection.PasswordCheck
|
import info.nightscout.androidaps.utils.protection.PasswordCheck
|
||||||
import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper
|
import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
import info.nightscout.core.ui.dialogs.TwoMessagesAlertDialog
|
import info.nightscout.core.ui.dialogs.TwoMessagesAlertDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
|
|
|
@ -45,17 +45,17 @@ import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin
|
import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.ui.elements.SingleClickButton
|
|
||||||
import info.nightscout.core.ui.UIRunnable
|
|
||||||
import info.nightscout.automation.AutomationPlugin
|
import info.nightscout.automation.AutomationPlugin
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.iob.displayText
|
import info.nightscout.core.iob.displayText
|
||||||
import info.nightscout.core.profile.toSignedUnitsString
|
import info.nightscout.core.profile.toSignedUnitsString
|
||||||
import info.nightscout.core.profile.toTargetRangeString
|
import info.nightscout.core.profile.toTargetRangeString
|
||||||
import info.nightscout.core.profile.toUnits
|
import info.nightscout.core.profile.toUnits
|
||||||
|
import info.nightscout.core.ui.UIRunnable
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.elements.SingleClickButton
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.core.wizard.QuickWizard
|
import info.nightscout.core.wizard.QuickWizard
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
|
|
|
@ -17,7 +17,7 @@ import info.nightscout.androidaps.plugins.general.overview.graphExtensions.Effec
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.GlucoseValueDataPoint
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.GlucoseValueDataPoint
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.TimeAsXAxisLabelFormatter
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.TimeAsXAxisLabelFormatter
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.GlucoseUnit
|
import info.nightscout.interfaces.GlucoseUnit
|
||||||
import info.nightscout.interfaces.profile.ProfileFunction
|
import info.nightscout.interfaces.profile.ProfileFunction
|
||||||
import info.nightscout.interfaces.utils.Round
|
import info.nightscout.interfaces.utils.Round
|
||||||
|
|
|
@ -16,13 +16,13 @@ import info.nightscout.androidaps.receivers.ReceiverStatusStore
|
||||||
import info.nightscout.androidaps.services.AlarmSoundServiceHelper
|
import info.nightscout.androidaps.services.AlarmSoundServiceHelper
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.iob.generateCOBString
|
import info.nightscout.core.iob.generateCOBString
|
||||||
import info.nightscout.core.iob.round
|
import info.nightscout.core.iob.round
|
||||||
import info.nightscout.core.profile.fromMgdlToUnits
|
import info.nightscout.core.profile.fromMgdlToUnits
|
||||||
import info.nightscout.core.profile.toMgdl
|
import info.nightscout.core.profile.toMgdl
|
||||||
import info.nightscout.core.profile.toTargetRangeString
|
import info.nightscout.core.profile.toTargetRangeString
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.core.wizard.BolusWizard
|
import info.nightscout.core.wizard.BolusWizard
|
||||||
import info.nightscout.core.wizard.QuickWizard
|
import info.nightscout.core.wizard.QuickWizard
|
||||||
import info.nightscout.core.wizard.QuickWizardEntry
|
import info.nightscout.core.wizard.QuickWizardEntry
|
||||||
|
|
|
@ -18,7 +18,7 @@ import androidx.annotation.StyleRes
|
||||||
import androidx.appcompat.view.ContextThemeWrapper
|
import androidx.appcompat.view.ContextThemeWrapper
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.maintenance.Prefs
|
import info.nightscout.interfaces.maintenance.Prefs
|
||||||
import info.nightscout.interfaces.maintenance.PrefsStatus
|
import info.nightscout.interfaces.maintenance.PrefsStatus
|
||||||
import info.nightscout.shared.extensions.runOnUiThread
|
import info.nightscout.shared.extensions.runOnUiThread
|
||||||
|
|
|
@ -110,7 +110,6 @@
|
||||||
<string name="openapsma_maxiob_summary">This value is called Max IOB in OpenAPS context\nThis is maximal insulin in [U] APS can deliver at once.</string>
|
<string name="openapsma_maxiob_summary">This value is called Max IOB in OpenAPS context\nThis is maximal insulin in [U] APS can deliver at once.</string>
|
||||||
<string name="language" translatable="false">Language</string>
|
<string name="language" translatable="false">Language</string>
|
||||||
<string name="password_preferences_encrypt_prompt">You will be asked for master password, which will be used to encrypt exported preferences.</string>
|
<string name="password_preferences_encrypt_prompt">You will be asked for master password, which will be used to encrypt exported preferences.</string>
|
||||||
<string name="password_preferences_decrypt_prompt">You will be asked for master password, which is needed to decrypt imported preferences.</string>
|
|
||||||
<string name="preferences_export_canceled">Export canceled! Preferences were NOT exported!</string>
|
<string name="preferences_export_canceled">Export canceled! Preferences were NOT exported!</string>
|
||||||
<string name="preferences_import_canceled">Import canceled! Preferences were NOT imported!</string>
|
<string name="preferences_import_canceled">Import canceled! Preferences were NOT imported!</string>
|
||||||
<string name="preferences_import_impossible">Cannot import preferences!</string>
|
<string name="preferences_import_impossible">Cannot import preferences!</string>
|
||||||
|
|
|
@ -11,7 +11,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.automation.AutomationEvent
|
import info.nightscout.automation.AutomationEvent
|
||||||
import info.nightscout.automation.AutomationPlugin
|
import info.nightscout.automation.AutomationPlugin
|
||||||
import info.nightscout.automation.R
|
import info.nightscout.automation.R
|
||||||
|
@ -23,6 +22,7 @@ import info.nightscout.automation.events.EventAutomationUpdateAction
|
||||||
import info.nightscout.automation.events.EventAutomationUpdateGui
|
import info.nightscout.automation.events.EventAutomationUpdateGui
|
||||||
import info.nightscout.automation.events.EventAutomationUpdateTrigger
|
import info.nightscout.automation.events.EventAutomationUpdateTrigger
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.rx.AapsSchedulers
|
import info.nightscout.rx.AapsSchedulers
|
||||||
import info.nightscout.rx.bus.RxBus
|
import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.shared.extensions.toVisibility
|
import info.nightscout.shared.extensions.toVisibility
|
||||||
|
|
|
@ -9,14 +9,14 @@ import android.widget.LinearLayout
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import com.google.common.base.Optional
|
import com.google.common.base.Optional
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.interfaces.utils.JsonHelper
|
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.automation.AutomationPlugin
|
import info.nightscout.automation.AutomationPlugin
|
||||||
import info.nightscout.automation.R
|
import info.nightscout.automation.R
|
||||||
import info.nightscout.automation.elements.ComparatorConnect
|
import info.nightscout.automation.elements.ComparatorConnect
|
||||||
import info.nightscout.automation.elements.InputDropdownMenu
|
import info.nightscout.automation.elements.InputDropdownMenu
|
||||||
import info.nightscout.automation.elements.LayoutBuilder
|
import info.nightscout.automation.elements.LayoutBuilder
|
||||||
import info.nightscout.automation.elements.StaticLabel
|
import info.nightscout.automation.elements.StaticLabel
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
|
import info.nightscout.interfaces.utils.JsonHelper
|
||||||
import info.nightscout.rx.events.EventBTChange
|
import info.nightscout.rx.events.EventBTChange
|
||||||
import info.nightscout.rx.logging.LTag
|
import info.nightscout.rx.logging.LTag
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
|
@ -1,10 +1,24 @@
|
||||||
package info.nightscout.androidaps.utils.protection
|
package info.nightscout.androidaps.utils.protection
|
||||||
|
|
||||||
import androidx.biometric.BiometricPrompt
|
import androidx.biometric.BiometricPrompt
|
||||||
import androidx.biometric.BiometricPrompt.*
|
import androidx.biometric.BiometricPrompt.AuthenticationResult
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_CANCELED
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_HW_NOT_PRESENT
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_HW_UNAVAILABLE
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_LOCKOUT
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_LOCKOUT_PERMANENT
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_NEGATIVE_BUTTON
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_NO_BIOMETRICS
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_NO_DEVICE_CREDENTIAL
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_NO_SPACE
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_TIMEOUT
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_UNABLE_TO_PROCESS
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_USER_CANCELED
|
||||||
|
import androidx.biometric.BiometricPrompt.ERROR_VENDOR
|
||||||
|
import androidx.biometric.BiometricPrompt.PromptInfo
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import info.nightscout.core.main.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.shared.extensions.runOnUiThread
|
import info.nightscout.shared.extensions.runOnUiThread
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ import androidx.annotation.StringRes
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
|
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
|
||||||
import info.nightscout.androidaps.utils.CryptoUtil
|
import info.nightscout.androidaps.utils.CryptoUtil
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.main.R
|
import info.nightscout.core.main.R
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.plugin.ActivePlugin
|
import info.nightscout.interfaces.plugin.ActivePlugin
|
||||||
import info.nightscout.shared.sharedPreferences.SP
|
import info.nightscout.shared.sharedPreferences.SP
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package info.nightscout.androidaps.utils.ui
|
package info.nightscout.androidaps.utils.ui
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import kotlin.jvm.JvmOverloads
|
|
||||||
import android.bluetooth.BluetoothManager
|
import android.bluetooth.BluetoothManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
|
@ -10,8 +9,8 @@ import android.util.AttributeSet
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.preference.ListPreference
|
import androidx.preference.ListPreference
|
||||||
import info.nightscout.core.main.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import java.util.*
|
import java.util.Vector
|
||||||
|
|
||||||
class BluetoothDevicePreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ListPreference(context, attrs) {
|
class BluetoothDevicePreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ListPreference(context, attrs) {
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,7 @@ import android.widget.Button
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import info.nightscout.core.main.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.core.main.databinding.NumberPickerLayoutBinding
|
import info.nightscout.core.main.databinding.NumberPickerLayoutBinding
|
||||||
import info.nightscout.shared.extensions.toVisibility
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.shared.SafeParse
|
|
||||||
import java.text.NumberFormat
|
import java.text.NumberFormat
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
import java.util.concurrent.ScheduledExecutorService
|
import java.util.concurrent.ScheduledExecutorService
|
||||||
|
@ -69,6 +67,20 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
||||||
false
|
false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
private fun Boolean.toVisibility() = if (this) View.VISIBLE else View.GONE
|
||||||
|
private fun stringToDouble(inputString: String?, defaultValue: Double = 0.0): Double {
|
||||||
|
var input = inputString ?: return defaultValue
|
||||||
|
var result = defaultValue
|
||||||
|
input = input.replace(",", ".")
|
||||||
|
input = input.replace("−", "-")
|
||||||
|
if (input == "") return defaultValue
|
||||||
|
try {
|
||||||
|
result = input.toDouble()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
// log.error("Error parsing " + input + " to double");
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
private inner class UpdateCounterTask(private val mInc: Boolean) : Runnable {
|
private inner class UpdateCounterTask(private val mInc: Boolean) : Runnable {
|
||||||
|
|
||||||
private var repeated = 0
|
private var repeated = 0
|
||||||
|
@ -121,7 +133,7 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
||||||
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
|
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
|
||||||
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
|
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
|
||||||
override fun afterTextChanged(s: Editable) {
|
override fun afterTextChanged(s: Editable) {
|
||||||
if (focused) currentValue = SafeParse.stringToDouble(binding.editText.text.toString())
|
if (focused) currentValue = stringToDouble(binding.editText.text.toString())
|
||||||
callValueChangedListener()
|
callValueChangedListener()
|
||||||
val inValid = currentValue > maxValue || currentValue < minValue
|
val inValid = currentValue > maxValue || currentValue < minValue
|
||||||
okButton?.visibility = inValid.not().toVisibility()
|
okButton?.visibility = inValid.not().toVisibility()
|
||||||
|
@ -174,7 +186,7 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
||||||
binding.editText.addTextChangedListener(textWatcher)
|
binding.editText.addTextChangedListener(textWatcher)
|
||||||
binding.editText.onFocusChangeListener = OnFocusChangeListener { _: View?, hasFocus: Boolean ->
|
binding.editText.onFocusChangeListener = OnFocusChangeListener { _: View?, hasFocus: Boolean ->
|
||||||
if (!hasFocus) {
|
if (!hasFocus) {
|
||||||
currentValue = SafeParse.stringToDouble(binding.editText.text.toString())
|
currentValue = stringToDouble(binding.editText.text.toString())
|
||||||
if (currentValue > maxValue) {
|
if (currentValue > maxValue) {
|
||||||
currentValue = maxValue
|
currentValue = maxValue
|
||||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package info.nightscout.core.toast
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
|
import info.nightscout.interfaces.notifications.Notification
|
||||||
|
import info.nightscout.rx.bus.RxBus
|
||||||
|
|
||||||
|
fun ToastUtils.showToastAdNotification(
|
||||||
|
ctx: Context?, rxBus: RxBus,
|
||||||
|
string: String?, soundID: Int
|
||||||
|
) {
|
||||||
|
showToastInUiThread(ctx, string)
|
||||||
|
playSound(ctx, soundID)
|
||||||
|
val notification = Notification(Notification.TOAST_ALARM, string!!, Notification.URGENT)
|
||||||
|
rxBus.send(EventNewNotification(notification))
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,10 @@ apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'info.nightscout.core.ui'
|
namespace 'info.nightscout.core.ui'
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
package info.nightscout.androidaps.utils
|
package info.nightscout.core.ui.toast
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.media.MediaPlayer
|
import android.media.MediaPlayer
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
|
import android.text.Html
|
||||||
|
import android.text.Spanned
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
@ -12,12 +14,8 @@ import android.widget.Toast
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import androidx.annotation.StringRes
|
import androidx.annotation.StringRes
|
||||||
import androidx.appcompat.view.ContextThemeWrapper
|
import androidx.appcompat.view.ContextThemeWrapper
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
import info.nightscout.core.ui.R
|
||||||
import info.nightscout.core.main.R
|
|
||||||
import info.nightscout.core.ui.getThemeColor
|
import info.nightscout.core.ui.getThemeColor
|
||||||
import info.nightscout.interfaces.notifications.Notification
|
|
||||||
import info.nightscout.interfaces.utils.HtmlHelper
|
|
||||||
import info.nightscout.rx.bus.RxBus
|
|
||||||
|
|
||||||
object ToastUtils {
|
object ToastUtils {
|
||||||
|
|
||||||
|
@ -78,29 +76,23 @@ object ToastUtils {
|
||||||
val toast: Toast =
|
val toast: Toast =
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
ctx,
|
ctx,
|
||||||
HtmlHelper.fromHtml("<font color='" + ContextThemeWrapper(ctx, R.style.AppTheme).getThemeColor(R.attr.toastBaseTextColor) + "'>" + string + "</font>"),
|
fromHtml("<font color='" + ContextThemeWrapper(ctx, R.style.AppTheme).getThemeColor(R.attr.toastBaseTextColor) + "'>" + string + "</font>"),
|
||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
)
|
)
|
||||||
toast.show()
|
toast.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun showToastInUiThread(
|
fun playSound(ctx: Context?, soundID: Int) {
|
||||||
ctx: Context?, rxBus: RxBus,
|
|
||||||
string: String?, soundID: Int
|
|
||||||
) {
|
|
||||||
showToastInUiThread(ctx, string)
|
|
||||||
playSound(ctx, soundID)
|
|
||||||
val notification = Notification(Notification.TOAST_ALARM, string!!, Notification.URGENT)
|
|
||||||
rxBus.send(EventNewNotification(notification))
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun playSound(ctx: Context?, soundID: Int) {
|
|
||||||
val soundMP = MediaPlayer.create(ctx, soundID)
|
val soundMP = MediaPlayer.create(ctx, soundID)
|
||||||
soundMP.start()
|
soundMP.start()
|
||||||
soundMP.setOnCompletionListener { obj: MediaPlayer -> obj.release() }
|
soundMP.setOnCompletionListener { obj: MediaPlayer -> obj.release() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun fromHtml(source: String): Spanned {
|
||||||
|
return Html.fromHtml(source, Html.FROM_HTML_MODE_LEGACY)
|
||||||
|
}
|
||||||
|
|
||||||
object Long {
|
object Long {
|
||||||
|
|
||||||
fun warnToast(ctx: Context?, string: String) {
|
fun warnToast(ctx: Context?, string: String) {
|
|
@ -9,4 +9,7 @@
|
||||||
<string name="yes">Yes</string>
|
<string name="yes">Yes</string>
|
||||||
<string name="no">No</string>
|
<string name="no">No</string>
|
||||||
|
|
||||||
|
<!-- TwoMessagesDialog -->
|
||||||
|
<string name="password_preferences_decrypt_prompt">You will be asked for master password, which is needed to decrypt imported preferences.</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -14,8 +14,8 @@ import android.provider.Settings
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import info.nightscout.androidaps.activities.DaggerAppCompatActivityWithResult
|
import info.nightscout.androidaps.activities.DaggerAppCompatActivityWithResult
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.AndroidPermission
|
import info.nightscout.interfaces.AndroidPermission
|
||||||
import info.nightscout.interfaces.Config
|
import info.nightscout.interfaces.Config
|
||||||
import info.nightscout.interfaces.notifications.Notification
|
import info.nightscout.interfaces.notifications.Notification
|
||||||
|
|
|
@ -2,8 +2,9 @@ package info.nightscout.implementation
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import info.nightscout.androidaps.annotations.OpenForTesting
|
import info.nightscout.androidaps.annotations.OpenForTesting
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.main.R
|
import info.nightscout.core.main.R
|
||||||
|
import info.nightscout.core.toast.showToastAdNotification
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.impl.AppRepository
|
import info.nightscout.database.impl.AppRepository
|
||||||
import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction
|
import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncementTransaction
|
||||||
import info.nightscout.interfaces.utils.HardLimits
|
import info.nightscout.interfaces.utils.HardLimits
|
||||||
|
@ -101,7 +102,7 @@ class HardLimitsImpl @Inject constructor(
|
||||||
msg += rh.gs(R.string.valuelimitedto, value, newValue)
|
msg += rh.gs(R.string.valuelimitedto, value, newValue)
|
||||||
aapsLogger.error(msg)
|
aapsLogger.error(msg)
|
||||||
disposable += repository.runTransaction(InsertTherapyEventAnnouncementTransaction(msg)).subscribe()
|
disposable += repository.runTransaction(InsertTherapyEventAnnouncementTransaction(msg)).subscribe()
|
||||||
ToastUtils.showToastInUiThread(context, rxBus, msg, R.raw.error)
|
ToastUtils.showToastAdNotification(context, rxBus, msg, R.raw.error)
|
||||||
}
|
}
|
||||||
return newValue
|
return newValue
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import info.nightscout.androidaps.annotations.OpenForTesting
|
import info.nightscout.androidaps.annotations.OpenForTesting
|
||||||
import info.nightscout.androidaps.receivers.Intents
|
import info.nightscout.androidaps.receivers.Intents
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.GlucoseValue
|
import info.nightscout.database.entities.GlucoseValue
|
||||||
import info.nightscout.interfaces.GlucoseUnit
|
import info.nightscout.interfaces.GlucoseUnit
|
||||||
import info.nightscout.interfaces.XDripBroadcast
|
import info.nightscout.interfaces.XDripBroadcast
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import dagger.android.support.DaggerDialogFragment
|
import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.plugins.R
|
import info.nightscout.plugins.R
|
||||||
import info.nightscout.plugins.constraints.objectives.events.EventObjectivesUpdateGui
|
import info.nightscout.plugins.constraints.objectives.events.EventObjectivesUpdateGui
|
||||||
import info.nightscout.plugins.constraints.objectives.objectives.Objective
|
import info.nightscout.plugins.constraints.objectives.objectives.Objective
|
||||||
|
|
|
@ -14,9 +14,9 @@ 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.activities.NoSplashAppCompatActivity
|
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.interfaces.smsCommunicator.SmsCommunicator
|
import info.nightscout.interfaces.smsCommunicator.SmsCommunicator
|
||||||
|
|
|
@ -12,10 +12,10 @@ import info.nightscout.androidaps.extensions.blockFromJsonArray
|
||||||
import info.nightscout.androidaps.extensions.pureProfileFromJson
|
import info.nightscout.androidaps.extensions.pureProfileFromJson
|
||||||
import info.nightscout.androidaps.receivers.DataWorkerStorage
|
import info.nightscout.androidaps.receivers.DataWorkerStorage
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.profile.ProfileStoreObject
|
import info.nightscout.core.profile.ProfileStoreObject
|
||||||
import info.nightscout.core.profile.toMgdl
|
import info.nightscout.core.profile.toMgdl
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.Config
|
import info.nightscout.interfaces.Config
|
||||||
import info.nightscout.interfaces.Constants
|
import info.nightscout.interfaces.Constants
|
||||||
import info.nightscout.interfaces.GlucoseUnit
|
import info.nightscout.interfaces.GlucoseUnit
|
||||||
|
|
|
@ -12,8 +12,9 @@ import androidx.preference.PreferenceFragmentCompat
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
import androidx.preference.SwitchPreference
|
import androidx.preference.SwitchPreference
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
|
import info.nightscout.core.toast.showToastAdNotification
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.BuildHelper
|
import info.nightscout.interfaces.BuildHelper
|
||||||
import info.nightscout.interfaces.Config
|
import info.nightscout.interfaces.Config
|
||||||
import info.nightscout.interfaces.Constants
|
import info.nightscout.interfaces.Constants
|
||||||
|
@ -186,7 +187,7 @@ class NSClientPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
return fromHtml(newTextLog.toString())
|
return fromHtml(newTextLog.toString())
|
||||||
} catch (e: OutOfMemoryError) {
|
} catch (e: OutOfMemoryError) {
|
||||||
ToastUtils.showToastInUiThread(context, rxBus, "Out of memory!\nStop using this phone !!!", R.raw.error)
|
ToastUtils.showToastAdNotification(context, rxBus, "Out of memory!\nStop using this phone !!!", R.raw.error)
|
||||||
}
|
}
|
||||||
return fromHtml("")
|
return fromHtml("")
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,9 @@ import androidx.work.OneTimeWorkRequest
|
||||||
import androidx.work.WorkInfo
|
import androidx.work.WorkInfo
|
||||||
import androidx.work.WorkManager
|
import androidx.work.WorkManager
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
|
import info.nightscout.core.toast.showToastAdNotification
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.BuildHelper
|
import info.nightscout.interfaces.BuildHelper
|
||||||
import info.nightscout.interfaces.Config
|
import info.nightscout.interfaces.Config
|
||||||
import info.nightscout.interfaces.Constants
|
import info.nightscout.interfaces.Constants
|
||||||
|
@ -226,7 +227,7 @@ class NSClientV3Plugin @Inject constructor(
|
||||||
}
|
}
|
||||||
return HtmlHelper.fromHtml(newTextLog.toString())
|
return HtmlHelper.fromHtml(newTextLog.toString())
|
||||||
} catch (e: OutOfMemoryError) {
|
} catch (e: OutOfMemoryError) {
|
||||||
ToastUtils.showToastInUiThread(context, rxBus, "Out of memory!\nStop using this phone !!!", R.raw.error)
|
ToastUtils.showToastAdNotification(context, rxBus, "Out of memory!\nStop using this phone !!!", R.raw.error)
|
||||||
}
|
}
|
||||||
return HtmlHelper.fromHtml("")
|
return HtmlHelper.fromHtml("")
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,9 @@ import androidx.preference.PreferenceFragmentCompat
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.events.EventNewBG
|
import info.nightscout.androidaps.events.EventNewBG
|
||||||
import info.nightscout.androidaps.receivers.ReceiverStatusStore
|
import info.nightscout.androidaps.receivers.ReceiverStatusStore
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
|
import info.nightscout.core.toast.showToastAdNotification
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.Constants
|
import info.nightscout.interfaces.Constants
|
||||||
import info.nightscout.interfaces.plugin.PluginBase
|
import info.nightscout.interfaces.plugin.PluginBase
|
||||||
import info.nightscout.interfaces.plugin.PluginDescription
|
import info.nightscout.interfaces.plugin.PluginDescription
|
||||||
|
@ -171,7 +172,7 @@ class TidepoolPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
textLog = HtmlHelper.fromHtml(newTextLog.toString())
|
textLog = HtmlHelper.fromHtml(newTextLog.toString())
|
||||||
} catch (e: OutOfMemoryError) {
|
} catch (e: OutOfMemoryError) {
|
||||||
ToastUtils.showToastInUiThread(context, rxBus, "Out of memory!\nStop using this phone !!!", R.raw.error)
|
ToastUtils.showToastAdNotification(context, rxBus, "Out of memory!\nStop using this phone !!!", R.raw.error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ dependencies {
|
||||||
implementation project(':app-wear-shared:shared')
|
implementation project(':app-wear-shared:shared')
|
||||||
implementation project(':core:core-main')
|
implementation project(':core:core-main')
|
||||||
implementation project(':core:fabric')
|
implementation project(':core:fabric')
|
||||||
|
implementation project(':core:ui')
|
||||||
implementation project(':pump:dana')
|
implementation project(':pump:dana')
|
||||||
implementation project(':interfaces')
|
implementation project(':interfaces')
|
||||||
}
|
}
|
|
@ -40,8 +40,8 @@ import info.nightscout.androidaps.danar.comm.MsgHistorySuspend;
|
||||||
import info.nightscout.androidaps.danar.comm.MsgPCCommStart;
|
import info.nightscout.androidaps.danar.comm.MsgPCCommStart;
|
||||||
import info.nightscout.androidaps.danar.comm.MsgPCCommStop;
|
import info.nightscout.androidaps.danar.comm.MsgPCCommStop;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
||||||
import info.nightscout.androidaps.utils.ToastUtils;
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy;
|
import info.nightscout.core.fabric.FabricPrivacy;
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils;
|
||||||
import info.nightscout.interfaces.notifications.Notification;
|
import info.nightscout.interfaces.notifications.Notification;
|
||||||
import info.nightscout.interfaces.plugin.ActivePlugin;
|
import info.nightscout.interfaces.plugin.ActivePlugin;
|
||||||
import info.nightscout.interfaces.profile.Profile;
|
import info.nightscout.interfaces.profile.Profile;
|
||||||
|
|
|
@ -20,8 +20,8 @@ import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotifi
|
||||||
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
|
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
|
||||||
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage
|
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.constraints.Constraint
|
import info.nightscout.interfaces.constraints.Constraint
|
||||||
import info.nightscout.interfaces.constraints.Constraints
|
import info.nightscout.interfaces.constraints.Constraints
|
||||||
import info.nightscout.interfaces.notifications.Notification
|
import info.nightscout.interfaces.notifications.Notification
|
||||||
|
|
|
@ -26,7 +26,7 @@ import info.nightscout.androidaps.danars.databinding.DanarsBlescannerActivityBin
|
||||||
import info.nightscout.androidaps.danars.events.EventDanaRSDeviceChange
|
import info.nightscout.androidaps.danars.events.EventDanaRSDeviceChange
|
||||||
import info.nightscout.androidaps.extensions.safeEnable
|
import info.nightscout.androidaps.extensions.safeEnable
|
||||||
import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck
|
import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.shared.sharedPreferences.SP
|
import info.nightscout.shared.sharedPreferences.SP
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
|
@ -34,7 +34,7 @@ import info.nightscout.androidaps.extensions.notify
|
||||||
import info.nightscout.androidaps.extensions.waitMillis
|
import info.nightscout.androidaps.extensions.waitMillis
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.notifications.Notification
|
import info.nightscout.interfaces.notifications.Notification
|
||||||
import info.nightscout.interfaces.pump.PumpSync
|
import info.nightscout.interfaces.pump.PumpSync
|
||||||
import info.nightscout.rx.bus.RxBus
|
import info.nightscout.rx.bus.RxBus
|
||||||
|
|
|
@ -36,6 +36,7 @@ dependencies {
|
||||||
api "androidx.room:room-ktx:$room_version"
|
api "androidx.room:room-ktx:$room_version"
|
||||||
api "androidx.room:room-runtime:$room_version"
|
api "androidx.room:room-runtime:$room_version"
|
||||||
api "androidx.room:room-rxjava3:$room_version"
|
api "androidx.room:room-rxjava3:$room_version"
|
||||||
|
implementation project(path: ':core:ui')
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
kapt "androidx.room:room-compiler:$room_version"
|
||||||
|
|
||||||
api "com.squareup.okhttp3:okhttp:$okhttp3_version"
|
api "com.squareup.okhttp3:okhttp:$okhttp3_version"
|
||||||
|
|
|
@ -18,8 +18,8 @@ import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotifi
|
||||||
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
|
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
|
||||||
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage
|
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.constraints.Constraint
|
import info.nightscout.interfaces.constraints.Constraint
|
||||||
import info.nightscout.interfaces.constraints.Constraints
|
import info.nightscout.interfaces.constraints.Constraints
|
||||||
import info.nightscout.interfaces.notifications.Notification
|
import info.nightscout.interfaces.notifications.Notification
|
||||||
|
|
|
@ -29,7 +29,7 @@ import info.nightscout.androidaps.diaconn.databinding.DiaconnG8BlescannerActivit
|
||||||
import info.nightscout.androidaps.diaconn.events.EventDiaconnG8DeviceChange
|
import info.nightscout.androidaps.diaconn.events.EventDiaconnG8DeviceChange
|
||||||
import info.nightscout.androidaps.extensions.safeEnable
|
import info.nightscout.androidaps.extensions.safeEnable
|
||||||
import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck
|
import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.shared.sharedPreferences.SP
|
import info.nightscout.shared.sharedPreferences.SP
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
|
@ -9,8 +9,8 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||||
import info.nightscout.androidaps.diaconn.DiaconnG8Pump
|
import info.nightscout.androidaps.diaconn.DiaconnG8Pump
|
||||||
import info.nightscout.androidaps.diaconn.R
|
import info.nightscout.androidaps.diaconn.R
|
||||||
import info.nightscout.androidaps.diaconn.databinding.DiaconnG8UserOptionsActivityBinding
|
import info.nightscout.androidaps.diaconn.databinding.DiaconnG8UserOptionsActivityBinding
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.plugin.ActivePlugin
|
import info.nightscout.interfaces.plugin.ActivePlugin
|
||||||
import info.nightscout.interfaces.queue.Callback
|
import info.nightscout.interfaces.queue.Callback
|
||||||
import info.nightscout.interfaces.queue.CommandQueue
|
import info.nightscout.interfaces.queue.CommandQueue
|
||||||
|
|
|
@ -27,7 +27,7 @@ import info.nightscout.androidaps.diaconn.packet.InjectionBlockReportPacket
|
||||||
import info.nightscout.androidaps.diaconn.packet.InsulinLackReportPacket
|
import info.nightscout.androidaps.diaconn.packet.InsulinLackReportPacket
|
||||||
import info.nightscout.androidaps.extensions.notify
|
import info.nightscout.androidaps.extensions.notify
|
||||||
import info.nightscout.androidaps.extensions.waitMillis
|
import info.nightscout.androidaps.extensions.waitMillis
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.ui.ActivityNames
|
import info.nightscout.interfaces.ui.ActivityNames
|
||||||
import info.nightscout.rx.bus.RxBus
|
import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.rx.events.EventPumpStatusChanged
|
import info.nightscout.rx.events.EventPumpStatusChanged
|
||||||
|
|
|
@ -3,12 +3,16 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ui
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.*
|
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.R
|
import info.nightscout.androidaps.plugins.pump.eopatch.R
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchStep
|
import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchStep
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.databinding.FragmentEopatchConnectNewBinding
|
import info.nightscout.androidaps.plugins.pump.eopatch.databinding.FragmentEopatchConnectNewBinding
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.ACTIVATION_FAILED
|
||||||
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.BONDING_FAILED
|
||||||
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.GET_PATCH_INFO_FAILED
|
||||||
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SCAN_FAILED
|
||||||
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SELF_TEST_FAILED
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
|
|
||||||
class EopatchConnectNewFragment : EoBaseFragment<FragmentEopatchConnectNewBinding>() {
|
class EopatchConnectNewFragment : EoBaseFragment<FragmentEopatchConnectNewBinding>() {
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import info.nightscout.androidaps.plugins.pump.eopatch.core.code.BolusType
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.databinding.FragmentEopatchOverviewBinding
|
import info.nightscout.androidaps.plugins.pump.eopatch.databinding.FragmentEopatchOverviewBinding
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.extension.takeOne
|
import info.nightscout.androidaps.plugins.pump.eopatch.extension.takeOne
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchOverviewViewModel
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchOverviewViewModel
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.rx.AapsSchedulers
|
import info.nightscout.rx.AapsSchedulers
|
||||||
import info.nightscout.rx.bus.RxBus
|
import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.rx.logging.AAPSLogger
|
import info.nightscout.rx.logging.AAPSLogger
|
||||||
|
|
|
@ -9,7 +9,7 @@ import info.nightscout.androidaps.plugins.pump.eopatch.R
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchStep
|
import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchStep
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.databinding.FragmentEopatchRotateKnobBinding
|
import info.nightscout.androidaps.plugins.pump.eopatch.databinding.FragmentEopatchRotateKnobBinding
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel
|
import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
|
|
||||||
class EopatchRotateKnobFragment : EoBaseFragment<FragmentEopatchRotateKnobBinding>() {
|
class EopatchRotateKnobFragment : EoBaseFragment<FragmentEopatchRotateKnobBinding>() {
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ import com.google.common.collect.Lists
|
||||||
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||||
import info.nightscout.androidaps.data.ProfileSealed
|
import info.nightscout.androidaps.data.ProfileSealed
|
||||||
import info.nightscout.androidaps.interfaces.stats.TddCalculator
|
import info.nightscout.androidaps.interfaces.stats.TddCalculator
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.EffectiveProfileSwitch
|
import info.nightscout.database.entities.EffectiveProfileSwitch
|
||||||
import info.nightscout.database.impl.AppRepository
|
import info.nightscout.database.impl.AppRepository
|
||||||
import info.nightscout.interfaces.plugin.ActivePlugin
|
import info.nightscout.interfaces.plugin.ActivePlugin
|
||||||
|
|
|
@ -3,7 +3,7 @@ package info.nightscout.ui.activities
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.interfaces.plugin.ActivePlugin
|
import info.nightscout.interfaces.plugin.ActivePlugin
|
||||||
import info.nightscout.interfaces.profile.ProfileFunction
|
import info.nightscout.interfaces.profile.ProfileFunction
|
||||||
import info.nightscout.interfaces.ui.ActivityNames
|
import info.nightscout.interfaces.ui.ActivityNames
|
||||||
|
|
|
@ -20,9 +20,9 @@ import info.nightscout.androidaps.events.EventNewHistoryData
|
||||||
import info.nightscout.androidaps.extensions.iobCalc
|
import info.nightscout.androidaps.extensions.iobCalc
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ActionModeHelper
|
import info.nightscout.androidaps.utils.ActionModeHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.Bolus
|
import info.nightscout.database.entities.Bolus
|
||||||
import info.nightscout.database.entities.BolusCalculatorResult
|
import info.nightscout.database.entities.BolusCalculatorResult
|
||||||
import info.nightscout.database.entities.Carbs
|
import info.nightscout.database.entities.Carbs
|
||||||
|
|
|
@ -16,10 +16,10 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ActionModeHelper
|
import info.nightscout.androidaps.utils.ActionModeHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.Translator
|
import info.nightscout.androidaps.utils.Translator
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.TherapyEvent
|
import info.nightscout.database.entities.TherapyEvent
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
|
|
|
@ -19,9 +19,9 @@ import info.nightscout.androidaps.extensions.iobCalc
|
||||||
import info.nightscout.androidaps.extensions.isInProgress
|
import info.nightscout.androidaps.extensions.isInProgress
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ActionModeHelper
|
import info.nightscout.androidaps.utils.ActionModeHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.ExtendedBolus
|
import info.nightscout.database.entities.ExtendedBolus
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
|
|
|
@ -22,9 +22,9 @@ import info.nightscout.androidaps.events.EventNewHistoryData
|
||||||
import info.nightscout.androidaps.extensions.getCustomizedName
|
import info.nightscout.androidaps.extensions.getCustomizedName
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ActionModeHelper
|
import info.nightscout.androidaps.utils.ActionModeHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
|
|
|
@ -22,10 +22,10 @@ import info.nightscout.androidaps.extensions.highValueToUnitsToString
|
||||||
import info.nightscout.androidaps.extensions.lowValueToUnitsToString
|
import info.nightscout.androidaps.extensions.lowValueToUnitsToString
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ActionModeHelper
|
import info.nightscout.androidaps.utils.ActionModeHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.Translator
|
import info.nightscout.androidaps.utils.Translator
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.TemporaryTarget
|
import info.nightscout.database.entities.TemporaryTarget
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
|
|
|
@ -20,9 +20,9 @@ import info.nightscout.androidaps.extensions.toStringFull
|
||||||
import info.nightscout.androidaps.extensions.toTemporaryBasal
|
import info.nightscout.androidaps.extensions.toTemporaryBasal
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ActionModeHelper
|
import info.nightscout.androidaps.utils.ActionModeHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.ExtendedBolus
|
import info.nightscout.database.entities.ExtendedBolus
|
||||||
import info.nightscout.database.entities.TemporaryBasal
|
import info.nightscout.database.entities.TemporaryBasal
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
|
|
|
@ -13,10 +13,10 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper
|
import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
|
|
|
@ -14,11 +14,11 @@ import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS
|
||||||
import info.nightscout.core.profile.toMgdl
|
import info.nightscout.core.profile.toMgdl
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.TemporaryTarget
|
import info.nightscout.database.entities.TemporaryTarget
|
||||||
import info.nightscout.database.entities.UserEntry.Action
|
import info.nightscout.database.entities.UserEntry.Action
|
||||||
import info.nightscout.database.entities.UserEntry.Sources
|
import info.nightscout.database.entities.UserEntry.Sources
|
||||||
|
|
|
@ -9,9 +9,9 @@ import com.google.common.base.Joiner
|
||||||
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||||
import info.nightscout.androidaps.extensions.formatColor
|
import info.nightscout.androidaps.extensions.formatColor
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
import info.nightscout.interfaces.constraints.Constraint
|
import info.nightscout.interfaces.constraints.Constraint
|
||||||
|
|
|
@ -10,9 +10,9 @@ import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||||
import info.nightscout.androidaps.extensions.formatColor
|
import info.nightscout.androidaps.extensions.formatColor
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.TherapyEvent
|
import info.nightscout.database.entities.TherapyEvent
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
|
|
|
@ -13,12 +13,12 @@ import info.nightscout.androidaps.extensions.formatColor
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.extensions.toSignedString
|
import info.nightscout.androidaps.utils.extensions.toSignedString
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.profile.toMgdl
|
import info.nightscout.core.profile.toMgdl
|
||||||
import info.nightscout.core.pumpExtensions.insertBolusTransaction
|
import info.nightscout.core.pumpExtensions.insertBolusTransaction
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.TemporaryTarget
|
import info.nightscout.database.entities.TemporaryTarget
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
|
|
|
@ -12,10 +12,10 @@ import android.view.WindowManager
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import dagger.android.support.DaggerDialogFragment
|
import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.OfflineEvent
|
import info.nightscout.database.entities.OfflineEvent
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
|
|
|
@ -13,10 +13,10 @@ import info.nightscout.androidaps.data.ProfileSealed
|
||||||
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.profile.toMgdl
|
import info.nightscout.core.profile.toMgdl
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.TemporaryTarget
|
import info.nightscout.database.entities.TemporaryTarget
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
|
|
|
@ -9,9 +9,9 @@ import com.google.common.base.Joiner
|
||||||
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||||
import info.nightscout.androidaps.extensions.formatColor
|
import info.nightscout.androidaps.extensions.formatColor
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
import info.nightscout.interfaces.constraints.Constraint
|
import info.nightscout.interfaces.constraints.Constraint
|
||||||
|
|
|
@ -11,11 +11,11 @@ import com.google.common.collect.Lists
|
||||||
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.profile.toCurrentUnitsString
|
import info.nightscout.core.profile.toCurrentUnitsString
|
||||||
import info.nightscout.core.profile.toMgdl
|
import info.nightscout.core.profile.toMgdl
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.TemporaryTarget
|
import info.nightscout.database.entities.TemporaryTarget
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
|
|
|
@ -12,11 +12,11 @@ import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||||
import info.nightscout.androidaps.extensions.formatColor
|
import info.nightscout.androidaps.extensions.formatColor
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.pumpExtensions.insertBolusTransaction
|
import info.nightscout.core.pumpExtensions.insertBolusTransaction
|
||||||
import info.nightscout.core.pumpExtensions.insertCarbsTransaction
|
import info.nightscout.core.pumpExtensions.insertCarbsTransaction
|
||||||
import info.nightscout.core.ui.dialogs.OKDialog
|
import info.nightscout.core.ui.dialogs.OKDialog
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.database.entities.UserEntry
|
import info.nightscout.database.entities.UserEntry
|
||||||
import info.nightscout.database.entities.ValueWithUnit
|
import info.nightscout.database.entities.ValueWithUnit
|
||||||
import info.nightscout.database.impl.AppRepository
|
import info.nightscout.database.impl.AppRepository
|
||||||
|
|
|
@ -22,12 +22,12 @@ import info.nightscout.androidaps.data.ProfileSealed
|
||||||
import info.nightscout.androidaps.extensions.formatColor
|
import info.nightscout.androidaps.extensions.formatColor
|
||||||
import info.nightscout.androidaps.extensions.valueToUnits
|
import info.nightscout.androidaps.extensions.valueToUnits
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
|
||||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||||
import info.nightscout.core.fabric.FabricPrivacy
|
import info.nightscout.core.fabric.FabricPrivacy
|
||||||
import info.nightscout.core.iob.round
|
import info.nightscout.core.iob.round
|
||||||
import info.nightscout.core.profile.toMgdl
|
import info.nightscout.core.profile.toMgdl
|
||||||
import info.nightscout.core.profile.toUnitsString
|
import info.nightscout.core.profile.toUnitsString
|
||||||
|
import info.nightscout.core.ui.toast.ToastUtils
|
||||||
import info.nightscout.core.wizard.BolusWizard
|
import info.nightscout.core.wizard.BolusWizard
|
||||||
import info.nightscout.database.impl.AppRepository
|
import info.nightscout.database.impl.AppRepository
|
||||||
import info.nightscout.database.impl.ValueWrapper
|
import info.nightscout.database.impl.ValueWrapper
|
||||||
|
|
Loading…
Reference in a new issue