ErrorHelperActivy call cleanup
This commit is contained in:
parent
d0b229b2cb
commit
07abc0f2b6
|
@ -443,12 +443,7 @@ class BolusWizard @Inject constructor(
|
|||
commandQueue.tempBasalPercent(0, 120, true, profile, PumpSync.TemporaryBasalType.NORMAL, object : Callback() {
|
||||
override fun run() {
|
||||
if (!result.success) {
|
||||
val i = Intent(ctx, ErrorHelperActivity::class.java)
|
||||
i.putExtra(ErrorHelperActivity.SOUND_ID, R.raw.boluserror)
|
||||
i.putExtra(ErrorHelperActivity.STATUS, result.comment)
|
||||
i.putExtra(ErrorHelperActivity.TITLE, rh.gs(R.string.tempbasaldeliveryerror))
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
ctx.startActivity(i)
|
||||
ErrorHelperActivity.runAlarm(ctx, result.comment, rh.gs(R.string.tempbasaldeliveryerror), R.raw.boluserror)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -152,12 +152,7 @@ class DiaconnG8UserOptionsActivity : NoSplashAppCompatActivity() {
|
|||
commandQueue.setUserOptions(object : Callback() {
|
||||
override fun run() {
|
||||
if (!result.success) {
|
||||
val i = Intent(context, ErrorHelperActivity::class.java)
|
||||
i.putExtra("soundid", R.raw.boluserror)
|
||||
i.putExtra("status", result.comment)
|
||||
i.putExtra("title", rh.gs(R.string.pumperror))
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(i)
|
||||
ErrorHelperActivity.runAlarm(context, result.comment, rh.gs(R.string.pumperror), R.raw.boluserror)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -290,35 +290,20 @@ class BLECommonService @Inject internal constructor(
|
|||
if(message is InjectionBlockReportPacket ) {
|
||||
message.handleMessage(data)
|
||||
diaconnG8Pump.bolusBlocked = true
|
||||
val i = Intent(context, ErrorHelperActivity::class.java)
|
||||
i.putExtra("soundid", R.raw.boluserror)
|
||||
i.putExtra("status", rh.gs(R.string.injectionblocked))
|
||||
i.putExtra("title", rh.gs(R.string.injectionblocked))
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(i)
|
||||
ErrorHelperActivity.runAlarm(context, rh.gs(R.string.injectionblocked), rh.gs(R.string.injectionblocked), R.raw.boluserror )
|
||||
return
|
||||
}
|
||||
// battery warning report
|
||||
if(message is BatteryWarningReportPacket ) {
|
||||
message.handleMessage(data)
|
||||
val i = Intent(context, ErrorHelperActivity::class.java)
|
||||
i.putExtra("soundid", R.raw.boluserror)
|
||||
i.putExtra("status", rh.gs(R.string.needbatteryreplace))
|
||||
i.putExtra("title", rh.gs(R.string.batterywarning))
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(i)
|
||||
ErrorHelperActivity.runAlarm(context, rh.gs(R.string.needbatteryreplace), rh.gs(R.string.batterywarning), R.raw.boluserror )
|
||||
return
|
||||
}
|
||||
|
||||
// insulin lack warning report
|
||||
if(message is InsulinLackReportPacket ) {
|
||||
message.handleMessage(data)
|
||||
val i = Intent(context, ErrorHelperActivity::class.java)
|
||||
i.putExtra("soundid", R.raw.boluserror)
|
||||
i.putExtra("status", rh.gs(R.string.needinsullinreplace))
|
||||
i.putExtra("title", rh.gs(R.string.insulinlackwarning))
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(i)
|
||||
ErrorHelperActivity.runAlarm(context, rh.gs(R.string.needinsullinreplace), rh.gs(R.string.insulinlackwarning), R.raw.boluserror )
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue