Merge remote-tracking branch 'Nightscout/dev' into Autotune/TuneWeekDaysClean
This commit is contained in:
commit
34339a0d5f
43 changed files with 377 additions and 317 deletions
|
@ -104,6 +104,8 @@ tasks.matching { it instanceof Test }.all {
|
|||
}
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.androidaps'
|
||||
ndkVersion "21.1.6352462"
|
||||
|
||||
defaultConfig {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="info.nightscout.androidaps">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
|
|
|
@ -224,7 +224,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
disposable += activePlugin.activeOverview.overviewBus
|
||||
.toObservable(EventUpdateOverviewIobCob::class.java)
|
||||
.debounce(1L, TimeUnit.SECONDS)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ updateIobCob() }, fabricPrivacy::logException)
|
||||
disposable += activePlugin.activeOverview.overviewBus
|
||||
.toObservable(EventUpdateOverviewSensitivity::class.java)
|
||||
|
@ -256,7 +256,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
disposable += rxBus
|
||||
.toObservable(EventNewBG::class.java)
|
||||
.debounce(1L, TimeUnit.SECONDS)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ updateBg() }, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventRefreshOverview::class.java)
|
||||
|
@ -287,19 +287,19 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ updateProfile() }, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventTempTargetChange::class.java)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ updateTemporaryTarget() }, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventExtendedBolusChange::class.java)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ updateExtendedBolus() }, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventTempBasalChange::class.java)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ updateTemporaryBasal() }, fabricPrivacy::logException)
|
||||
|
||||
refreshLoop = Runnable {
|
||||
|
@ -316,17 +316,19 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
fun refreshAll() {
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
updateBg()
|
||||
updateTime()
|
||||
updateProfile()
|
||||
updateTemporaryBasal()
|
||||
updateExtendedBolus()
|
||||
updateTemporaryTarget()
|
||||
updateIobCob()
|
||||
updateSensitivity()
|
||||
updateGraph()
|
||||
updateNotification()
|
||||
}
|
||||
updateBg()
|
||||
updateTemporaryBasal()
|
||||
updateExtendedBolus()
|
||||
updateIobCob()
|
||||
processButtonsVisibility()
|
||||
processAps()
|
||||
updateProfile()
|
||||
updateTemporaryTarget()
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
@ -513,6 +515,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
|
||||
// QuickWizard button
|
||||
val quickWizardEntry = quickWizard.getActive()
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
if (quickWizardEntry != null && lastBG != null && profile != null && pump.isInitialized() && !pump.isSuspended() && !loop.isDisconnected) {
|
||||
binding.buttonsLayout.quickWizardButton.visibility = View.VISIBLE
|
||||
val wizard = quickWizardEntry.doCalc(profile, profileName, lastBG, false)
|
||||
|
@ -520,6 +524,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
" " + rh.gs(R.string.formatinsulinunits, wizard.calculatedTotalInsulin)
|
||||
if (wizard.calculatedTotalInsulin <= 0) binding.buttonsLayout.quickWizardButton.visibility = View.GONE
|
||||
} else binding.buttonsLayout.quickWizardButton.visibility = View.GONE
|
||||
}
|
||||
|
||||
// **** Temp button ****
|
||||
val lastRun = loop.lastRun
|
||||
|
@ -530,6 +535,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
(lastRun.lastOpenModeAccept == 0L || lastRun.lastOpenModeAccept < lastRun.lastAPSRun) &&// never accepted or before last result
|
||||
lastRun.constraintsProcessed?.isChangeRequested == true // change is requested
|
||||
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
if (showAcceptButton && pump.isInitialized() && !pump.isSuspended() && (loop as PluginBase).isEnabled()) {
|
||||
binding.buttonsLayout.acceptTempButton.visibility = View.VISIBLE
|
||||
binding.buttonsLayout.acceptTempButton.text = "${rh.gs(R.string.setbasalquestion)}\n${lastRun!!.constraintsProcessed}"
|
||||
|
@ -593,9 +600,11 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
binding.buttonsLayout.userButtonsLayout.visibility = events.isNotEmpty().toVisibility()
|
||||
}
|
||||
}
|
||||
|
||||
private fun processAps() {
|
||||
val pump = activePlugin.activePump
|
||||
val profile = profileFunction.getProfile()
|
||||
|
||||
// aps mode
|
||||
val closedLoopEnabled = constraintChecker.isClosedLoopAllowed()
|
||||
|
@ -608,6 +617,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
}
|
||||
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
if (config.APS && pump.pumpDescription.isTempBasalCapable) {
|
||||
binding.infoLayout.apsMode.visibility = View.VISIBLE
|
||||
binding.infoLayout.timeLayout.visibility = View.GONE
|
||||
|
@ -675,7 +686,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
// Show variable sensitivity
|
||||
val request = loop.lastRun?.request
|
||||
if (request is DetermineBasalResultSMB) {
|
||||
val isfMgdl = profileFunction.getProfile()?.getIsfMgdl()
|
||||
val isfMgdl = profile?.getIsfMgdl()
|
||||
val variableSens = request.variableSens
|
||||
if (variableSens != isfMgdl && variableSens != null && isfMgdl != null) {
|
||||
binding.infoLayout.variableSensitivity.text =
|
||||
|
@ -706,6 +717,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
binding.uploader.text = nsDeviceStatus.uploaderStatusSpanned
|
||||
binding.uploader.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(R.string.uploader), nsDeviceStatus.extendedUploaderStatus) } }
|
||||
}
|
||||
}
|
||||
|
||||
private fun prepareGraphsIfNeeded(numOfGraphs: Int) {
|
||||
if (numOfGraphs != secondaryGraphs.size - 1) {
|
||||
|
@ -760,19 +772,26 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun updateBg() {
|
||||
_binding ?: return
|
||||
val units = profileFunction.getUnits()
|
||||
binding.infoLayout.bg.text = overviewData.lastBg?.valueToUnitsString(units)
|
||||
?: rh.gs(R.string.notavailable)
|
||||
binding.infoLayout.bg.setTextColor(overviewData.lastBgColor(context))
|
||||
binding.infoLayout.arrow.setImageResource(trendCalculator.getTrendArrow(overviewData.lastBg).directionToIcon())
|
||||
binding.infoLayout.arrow.setColorFilter(overviewData.lastBgColor(context))
|
||||
binding.infoLayout.arrow.contentDescription = overviewData.lastBgDescription + " " + rh.gs(R.string.and) + " " + trendCalculator.getTrendDescription(overviewData.lastBg)
|
||||
|
||||
val lastBg = overviewData.lastBg
|
||||
val lastBgColor = overviewData.lastBgColor(context)
|
||||
val isActualBg = overviewData.isActualBg
|
||||
val glucoseStatus = glucoseStatusProvider.glucoseStatusData
|
||||
val trendDescription = trendCalculator.getTrendDescription(lastBg)
|
||||
val trendArrow = trendCalculator.getTrendArrow(lastBg)
|
||||
val lastBgDescription = overviewData.lastBgDescription
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
binding.infoLayout.bg.text = lastBg?.valueToUnitsString(units)
|
||||
?: rh.gs(R.string.notavailable)
|
||||
binding.infoLayout.bg.setTextColor(lastBgColor)
|
||||
binding.infoLayout.arrow.setImageResource(trendArrow.directionToIcon())
|
||||
binding.infoLayout.arrow.setColorFilter(lastBgColor)
|
||||
binding.infoLayout.arrow.contentDescription = lastBgDescription + " " + rh.gs(R.string.and) + " " + trendDescription
|
||||
|
||||
if (glucoseStatus != null) {
|
||||
binding.infoLayout.deltaLarge.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
|
||||
binding.infoLayout.deltaLarge.setTextColor(overviewData.lastBgColor(context))
|
||||
binding.infoLayout.deltaLarge.setTextColor(lastBgColor)
|
||||
binding.infoLayout.delta.text = Profile.toSignedUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
|
||||
binding.infoLayout.avgDelta.text = Profile.toSignedUnitsString(glucoseStatus.shortAvgDelta, glucoseStatus.shortAvgDelta * Constants.MGDL_TO_MMOLL, units)
|
||||
binding.infoLayout.longAvgDelta.text = Profile.toSignedUnitsString(glucoseStatus.longAvgDelta, glucoseStatus.longAvgDelta * Constants.MGDL_TO_MMOLL, units)
|
||||
|
@ -785,16 +804,15 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
|
||||
// strike through if BG is old
|
||||
binding.infoLayout.bg.paintFlags =
|
||||
if (!overviewData.isActualBg) binding.infoLayout.bg.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
|
||||
if (!isActualBg) binding.infoLayout.bg.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
|
||||
else binding.infoLayout.bg.paintFlags and Paint.STRIKE_THRU_TEXT_FLAG.inv()
|
||||
|
||||
val outDate = (if (!overviewData.isActualBg) rh.gs(R.string.a11y_bg_outdated) else "")
|
||||
binding.infoLayout.bg.contentDescription =
|
||||
rh.gs(R.string.a11y_blood_glucose) + " " + binding.infoLayout.bg.text.toString() + " " + overviewData.lastBgDescription + " " + outDate
|
||||
val outDate = (if (!isActualBg) rh.gs(R.string.a11y_bg_outdated) else "")
|
||||
binding.infoLayout.bg.contentDescription = rh.gs(R.string.a11y_blood_glucose) + " " + binding.infoLayout.bg.text.toString() + " " + lastBgDescription + " " + outDate
|
||||
|
||||
binding.infoLayout.timeAgo.text = dateUtil.minAgo(rh, overviewData.lastBg?.timestamp)
|
||||
binding.infoLayout.timeAgo.contentDescription = dateUtil.minAgoLong(rh, overviewData.lastBg?.timestamp)
|
||||
binding.infoLayout.timeAgoShort.text = "(" + dateUtil.minAgoShort(overviewData.lastBg?.timestamp) + ")"
|
||||
binding.infoLayout.timeAgo.text = dateUtil.minAgo(rh, lastBg?.timestamp)
|
||||
binding.infoLayout.timeAgo.contentDescription = dateUtil.minAgoLong(rh, lastBg?.timestamp)
|
||||
binding.infoLayout.timeAgoShort.text = "(" + dateUtil.minAgoShort(lastBg?.timestamp) + ")"
|
||||
|
||||
val qualityIcon = bgQualityCheckPlugin.icon()
|
||||
if (qualityIcon != 0) {
|
||||
|
@ -808,11 +826,13 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
binding.infoLayout.bgQuality.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun updateProfile() {
|
||||
_binding ?: return
|
||||
val profileBackgroundColor =
|
||||
profileFunction.getProfile()?.let {
|
||||
val profile = profileFunction.getProfile()
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
val profileBackgroundColor = profile?.let {
|
||||
if (it is ProfileSealed.EPS) {
|
||||
if (it.value.originalPercentage != 100 || it.value.originalTimeshift != 0L || it.value.originalDuration != 0L)
|
||||
R.attr.ribbonWarningColor
|
||||
|
@ -824,8 +844,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
} ?: R.attr.ribbonCriticalColor
|
||||
|
||||
val profileTextColor =
|
||||
profileFunction.getProfile()?.let {
|
||||
val profileTextColor = profile?.let {
|
||||
if (it is ProfileSealed.EPS) {
|
||||
if (it.value.originalPercentage != 100 || it.value.originalTimeshift != 0L || it.value.originalDuration != 0L)
|
||||
R.attr.ribbonTextWarningColor
|
||||
|
@ -838,25 +857,33 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
} ?: R.attr.ribbonTextDefaultColor
|
||||
setRibbon(binding.activeProfile, profileTextColor, profileBackgroundColor, profileFunction.getProfileNameWithRemainingTime())
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateTemporaryBasal() {
|
||||
_binding ?: return
|
||||
binding.infoLayout.baseBasal.text = overviewData.temporaryBasalText(iobCobCalculator)
|
||||
binding.infoLayout.baseBasal.setTextColor(overviewData.temporaryBasalColor(context, iobCobCalculator))
|
||||
binding.infoLayout.baseBasalIcon.setImageResource(overviewData.temporaryBasalIcon(iobCobCalculator))
|
||||
binding.infoLayout.basalLayout.setOnClickListener {
|
||||
activity?.let { OKDialog.show(it, rh.gs(R.string.basal), overviewData.temporaryBasalDialogText(iobCobCalculator)) }
|
||||
val temporaryBasalText = overviewData.temporaryBasalText(iobCobCalculator)
|
||||
val temporaryBasalColor = overviewData.temporaryBasalColor(context, iobCobCalculator)
|
||||
val temporaryBasalIcon = overviewData.temporaryBasalIcon(iobCobCalculator)
|
||||
val temporaryBasalDialogText = overviewData.temporaryBasalDialogText(iobCobCalculator)
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
binding.infoLayout.baseBasal.text = temporaryBasalText
|
||||
binding.infoLayout.baseBasal.setTextColor(temporaryBasalColor)
|
||||
binding.infoLayout.baseBasalIcon.setImageResource(temporaryBasalIcon)
|
||||
binding.infoLayout.basalLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(R.string.basal), temporaryBasalDialogText) } }
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateExtendedBolus() {
|
||||
_binding ?: return
|
||||
val pump = activePlugin.activePump
|
||||
binding.infoLayout.extendedBolus.text = overviewData.extendedBolusText(iobCobCalculator)
|
||||
binding.infoLayout.extendedLayout.setOnClickListener {
|
||||
activity?.let { OKDialog.show(it, rh.gs(R.string.extended_bolus), overviewData.extendedBolusDialogText(iobCobCalculator)) }
|
||||
val extendedBolus = iobCobCalculator.getExtendedBolus(dateUtil.now())
|
||||
val extendedBolusText = overviewData.extendedBolusText(iobCobCalculator)
|
||||
val extendedBolusDialogText = overviewData.extendedBolusDialogText(iobCobCalculator)
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
binding.infoLayout.extendedBolus.text = extendedBolusText
|
||||
binding.infoLayout.extendedLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(R.string.extended_bolus), extendedBolusDialogText) } }
|
||||
binding.infoLayout.extendedLayout.visibility = (extendedBolus != null && !pump.isFakingTempsByExtendedBoluses).toVisibility()
|
||||
}
|
||||
binding.infoLayout.extendedLayout.visibility = (iobCobCalculator.getExtendedBolus(dateUtil.now()) != null && !pump.isFakingTempsByExtendedBoluses).toVisibility()
|
||||
}
|
||||
|
||||
fun updateTime() {
|
||||
|
@ -887,25 +914,26 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
binding.statusLightsLayout.pbAge,
|
||||
binding.statusLightsLayout.batteryLevel
|
||||
)
|
||||
processButtonsVisibility()
|
||||
processAps()
|
||||
}
|
||||
|
||||
fun updateIobCob() {
|
||||
_binding ?: return
|
||||
binding.infoLayout.iob.text = overviewData.iobText(iobCobCalculator)
|
||||
binding.infoLayout.iobLayout.setOnClickListener {
|
||||
activity?.let { OKDialog.show(it, rh.gs(R.string.iob), overviewData.iobDialogText(iobCobCalculator)) }
|
||||
}
|
||||
val iobText = overviewData.iobText(iobCobCalculator)
|
||||
val iobDialogText = overviewData.iobDialogText(iobCobCalculator)
|
||||
val displayText = overviewData.cobInfo(iobCobCalculator).displayText(rh, dateUtil, buildHelper.isEngineeringMode())
|
||||
val lastCarbsTime = overviewData.lastCarbsTime
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
binding.infoLayout.iob.text = iobText
|
||||
binding.infoLayout.iobLayout.setOnClickListener { activity?.let { OKDialog.show(it, rh.gs(R.string.iob), iobDialogText) } }
|
||||
// cob
|
||||
var cobText = overviewData.cobInfo(iobCobCalculator).displayText(rh, dateUtil, buildHelper.isEngineeringMode()) ?: rh.gs(R.string.value_unavailable_short)
|
||||
var cobText = displayText ?: rh.gs(R.string.value_unavailable_short)
|
||||
|
||||
val constraintsProcessed = loop.lastRun?.constraintsProcessed
|
||||
val lastRun = loop.lastRun
|
||||
if (config.APS && constraintsProcessed != null && lastRun != null) {
|
||||
if (constraintsProcessed.carbsReq > 0) {
|
||||
//only display carbsreq when carbs have not been entered recently
|
||||
if (overviewData.lastCarbsTime < lastRun.lastAPSRun) {
|
||||
if (lastCarbsTime < lastRun.lastAPSRun) {
|
||||
cobText += " | " + constraintsProcessed.carbsReq + " " + rh.gs(R.string.required)
|
||||
}
|
||||
if (carbAnimation?.isRunning == false)
|
||||
|
@ -917,12 +945,14 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
binding.infoLayout.cob.text = cobText
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun updateTemporaryTarget() {
|
||||
_binding ?: return
|
||||
val units = profileFunction.getUnits()
|
||||
val tempTarget = overviewData.temporaryTarget
|
||||
runOnUiThread {
|
||||
_binding ?: return@runOnUiThread
|
||||
if (tempTarget != null) {
|
||||
setRibbon(
|
||||
binding.tempTarget,
|
||||
|
@ -954,6 +984,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setRibbon(view: TextView, attrResText: Int, attrResBack: Int, text: String) {
|
||||
with(view) {
|
||||
|
|
|
@ -8,6 +8,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.automation'
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.automation">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
|
|
|
@ -8,6 +8,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.combo'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.combo">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:supportsRtl="true">
|
||||
|
|
|
@ -15,3 +15,7 @@ dependencies {
|
|||
implementation project(':shared')
|
||||
implementation project(':database')
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.core'
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.core">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
|
|
|
@ -10,6 +10,8 @@ apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.androidaps.dana'
|
||||
defaultConfig {
|
||||
kapt {
|
||||
arguments {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.dana">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:supportsRtl="true">
|
||||
|
|
|
@ -8,6 +8,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.danar'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.danar" >
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
|||
|
||||
android {
|
||||
ndkVersion "21.1.6352462"
|
||||
namespace 'info.nightscout.androidaps.danars'
|
||||
|
||||
defaultConfig {
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.danars">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
|
|
@ -7,6 +7,8 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.androidaps.database'
|
||||
defaultConfig {
|
||||
kapt {
|
||||
arguments {
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.database" />
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
|
|
|
@ -10,6 +10,8 @@ apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.androidaps.diaconn'
|
||||
defaultConfig {
|
||||
kapt {
|
||||
arguments {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.diaconn">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
|
|
@ -21,3 +21,4 @@ org.gradle.jvmargs=-Xmx2g
|
|||
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
|
|
|
@ -10,6 +10,8 @@ apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.androidaps.insight'
|
||||
defaultConfig {
|
||||
kapt {
|
||||
arguments {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.insight">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
|
|
@ -8,6 +8,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.plugins.pump.medtronic'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugins.pump.medtronic">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:supportsRtl="true">
|
||||
|
|
|
@ -9,6 +9,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.plugins.pump.omnipod.common'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="info.nightscout.androidaps.plugins.pump.omnipod.common"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:supportsRtl="true">
|
||||
|
|
|
@ -17,6 +17,8 @@ detekt { // TODO move to `subprojects` section in global build.gradle
|
|||
}
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.androidaps.plugins.pump.omnipod.dash'
|
||||
defaultConfig {
|
||||
kapt {
|
||||
arguments {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugins.pump.omnipod.dash">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
|
|
@ -10,6 +10,8 @@ apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.androidaps.plugins.pump.omnipod.eros'
|
||||
defaultConfig {
|
||||
kapt {
|
||||
arguments {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugins.pump.omnipod.eros">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:supportsRtl="true">
|
||||
|
|
|
@ -8,6 +8,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.plugin.general.openhumans'
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugin.general.openhumans">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application>
|
||||
<activity
|
||||
|
|
|
@ -8,6 +8,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.plugins.pump.common'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<manifest package="info.nightscout.androidaps.plugins.pump.common">
|
||||
<manifest>
|
||||
|
||||
<application>
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
android {
|
||||
namespace 'info.nightscout.androidaps.plugins.pump.common.hw.rileylink'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugins.pump.common.hw.rileylink">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
|
|
@ -11,6 +11,8 @@ apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
|||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
||||
|
||||
android {
|
||||
|
||||
namespace 'info.nightscout.shared'
|
||||
defaultConfig {
|
||||
minSdkVersion 23 // for wear
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.shared">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
|
@ -76,6 +76,7 @@ android {
|
|||
versionName version + "-nsclient"
|
||||
}
|
||||
}
|
||||
namespace 'info.nightscout.androidaps'
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="info.nightscout.androidaps">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-feature android:name="android.hardware.type.watch" />
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ class FillMenuActivity : MenuListActivity() {
|
|||
add(MenuItem(R.drawable.ic_canula, getString(R.string.action_free_amount)))
|
||||
}
|
||||
|
||||
override fun doAction(action: String) {
|
||||
when (action) {
|
||||
override fun doAction(position: String) {
|
||||
when (position) {
|
||||
getString(R.string.action_preset_1) -> rxBus.send(EventWearToMobile(EventData.ActionFillPresetPreCheck(1)))
|
||||
getString(R.string.action_preset_2) -> rxBus.send(EventWearToMobile(EventData.ActionFillPresetPreCheck(2)))
|
||||
getString(R.string.action_preset_3) -> rxBus.send(EventWearToMobile(EventData.ActionFillPresetPreCheck(3)))
|
||||
|
|
|
@ -40,8 +40,8 @@ class MainMenuActivity : MenuListActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun doAction(action: String) {
|
||||
when (action) {
|
||||
override fun doAction(position: String) {
|
||||
when (position) {
|
||||
getString(R.string.menu_settings) -> startActivity(Intent(this, WatchfaceConfigurationActivity::class.java).apply { addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) })
|
||||
getString(R.string.menu_resync) -> rxBus.send(EventWearToMobile(ActionResendData("Re-Sync")))
|
||||
getString(R.string.status_profile_switch) -> rxBus.send(EventWearToMobile(EventData.ActionProfileSwitchSendInitialData(System.currentTimeMillis())))
|
||||
|
|
|
@ -22,8 +22,8 @@ class StatusMenuActivity : MenuListActivity() {
|
|||
add(MenuItem(R.drawable.ic_tdd, getString(R.string.status_tdd)))
|
||||
}
|
||||
|
||||
override fun doAction(action: String) {
|
||||
when (action) {
|
||||
override fun doAction(position: String) {
|
||||
when (position) {
|
||||
getString(R.string.status_pump) -> rxBus.send(EventWearToMobile(ActionPumpStatus(System.currentTimeMillis())))
|
||||
getString(R.string.status_loop) -> rxBus.send(EventWearToMobile(ActionLoopStatus(System.currentTimeMillis())))
|
||||
getString(R.string.status_tdd) -> rxBus.send(EventWearToMobile(ActionTddStatus(System.currentTimeMillis())))
|
||||
|
|
Loading…
Reference in a new issue