Merge remote-tracking branch 'origin/dev' into dagger3
This commit is contained in:
commit
2995999989
4 changed files with 26 additions and 13 deletions
|
@ -56,7 +56,7 @@ class VersionCheckerUtils @Inject constructor(
|
|||
}
|
||||
}.start()
|
||||
} else
|
||||
aapsLogger.debug(LTag.CORE, "Github master version no checked. No connectivity")
|
||||
aapsLogger.debug(LTag.CORE, "Github master version not checked. No connectivity")
|
||||
|
||||
@Suppress("SameParameterValue")
|
||||
fun compareWithCurrentVersion(newVersion: String?, currentVersion: String) {
|
||||
|
|
|
@ -719,20 +719,28 @@ class SmsCommunicatorPlugin @Inject constructor(
|
|||
override fun run() {
|
||||
val detailedBolusInfo = DetailedBolusInfo()
|
||||
detailedBolusInfo.carbs = anInteger().toDouble()
|
||||
detailedBolusInfo.source = Source.USER
|
||||
detailedBolusInfo.date = secondLong()
|
||||
commandQueue.bolus(detailedBolusInfo, object : Callback() {
|
||||
override fun run() {
|
||||
if (result.success) {
|
||||
var replyText = String.format(resourceHelper.gs(R.string.smscommunicator_carbsset), anInteger)
|
||||
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||
sendSMSToAllNumbers(Sms(receivedSms.phoneNumber, replyText))
|
||||
} else {
|
||||
var replyText = resourceHelper.gs(R.string.smscommunicator_carbsfailed)
|
||||
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||
sendSMS(Sms(receivedSms.phoneNumber, replyText))
|
||||
if (activePlugin.activePump.pumpDescription.storesCarbInfo) {
|
||||
commandQueue.bolus(detailedBolusInfo, object : Callback() {
|
||||
override fun run() {
|
||||
if (result.success) {
|
||||
var replyText = String.format(resourceHelper.gs(R.string.smscommunicator_carbsset), anInteger)
|
||||
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||
sendSMSToAllNumbers(Sms(receivedSms.phoneNumber, replyText))
|
||||
} else {
|
||||
var replyText = resourceHelper.gs(R.string.smscommunicator_carbsfailed)
|
||||
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||
sendSMS(Sms(receivedSms.phoneNumber, replyText))
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
activePlugin.activeTreatments.addToHistoryTreatment(detailedBolusInfo, true)
|
||||
var replyText = String.format(resourceHelper.gs(R.string.smscommunicator_carbsset), anInteger)
|
||||
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||
sendSMSToAllNumbers(Sms(receivedSms.phoneNumber, replyText))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -281,6 +281,10 @@ public class TreatmentService extends OrmLiteBaseService<DatabaseHelper> {
|
|||
|
||||
// return true if new record is created
|
||||
public UpdateReturn createOrUpdate(Treatment treatment) {
|
||||
if (treatment != null && treatment.source == Source.NONE) {
|
||||
log.error("Coder error: source is not set for treatment: " + treatment, new Exception());
|
||||
//FabricPrivacy.logException(new Exception("Coder error: source is not set for treatment: " + treatment));
|
||||
}
|
||||
try {
|
||||
Treatment old;
|
||||
treatment.date = DatabaseHelper.roundDateToSec(treatment.date);
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
<string name="objectives_useloop">Inhoud van loop plugin weergeven</string>
|
||||
<string name="objectives_usescale">Gebruik de schaalfunctie: houd de BG grafiek lang ingedrukt</string>
|
||||
<string name="objectives_button_enter">Enter</string>
|
||||
<string name="enter_code_obtained_from_developers_to_bypass_the_rest_of_objectives">Als je ten minste 3 maanden closed loop ervaring hebt met een ander doe-het-zelf systeem dan kun je wellicht een code aanvragen om doelen over te slaan. Zie https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Usage/Objectives.html#doelen-overslaan voor details.</string>
|
||||
<string name="codeaccepted">Code geaccepteerd</string>
|
||||
<string name="codeinvalid">Code ongeldig</string>
|
||||
<string name="objectives_exam_objective">Bewijs je kennis</string>
|
||||
|
|
Loading…
Reference in a new issue