use of sugar.free.sightparser.applayer.descriptors.alerts.Maintenance24Occlusion in project SightRemote by TebbeUbben.
the class AlertActivity method setAlertDescription.
private void setAlertDescription() {
Alert alert = alertMessage.getAlert();
if (alert instanceof Reminder1DeliverBolus)
alertDescription.setText(R.string.alert_r1_description);
else if (alert instanceof Reminder2MissedBolus)
alertDescription.setText(R.string.alert_r2_description);
else if (alert instanceof Reminder3AlarmClock)
alertDescription.setText(R.string.alert_r3_description);
else if (alert instanceof Reminder4ChangeInfusionSet)
alertDescription.setText(R.string.alert_r4_description);
else if (alert instanceof Reminder7TBRCompleted) {
Reminder7TBRCompleted tbrCompleted = (Reminder7TBRCompleted) alert;
alertDescription.setText(HTMLUtil.getHTML(R.string.alert_r7_description, tbrCompleted.getAmount(), UnitFormatter.formatDuration(tbrCompleted.getDuration())));
} else if (alert instanceof Warning31CartridgeLow) {
Warning31CartridgeLow cartridgeLow = (Warning31CartridgeLow) alert;
alertDescription.setText(HTMLUtil.getHTML(R.string.alert_w31_description, UnitFormatter.formatUnits(cartridgeLow.getCartridgeAmount())));
} else if (alert instanceof Warning32BatteryLow)
alertDescription.setText(R.string.alert_w32_description);
else if (alert instanceof Warning33InvalidDateTime)
alertDescription.setText(R.string.alert_w33_description);
else if (alert instanceof Warning34EndOfWarranty)
alertDescription.setText(R.string.alert_w34_description);
else if (alert instanceof Warning36TBRCancelled) {
Warning36TBRCancelled tbrCancelled = (Warning36TBRCancelled) alert;
alertDescription.setText(HTMLUtil.getHTML(R.string.alert_w36_description, tbrCancelled.getAmount(), UnitFormatter.formatDuration(tbrCancelled.getDuration())));
} else if (alert instanceof Warning38BolusCancelled) {
Warning38BolusCancelled bolusCancelled = (Warning38BolusCancelled) alert;
alertDescription.setText(HTMLUtil.getHTML(R.string.alert_w38_description, UnitFormatter.formatUnits(bolusCancelled.getProgrammedAmount()), UnitFormatter.formatUnits(bolusCancelled.getDeliveredAmount())));
} else if (alert instanceof Warning39LoantimeWarning)
alertDescription.setText(R.string.alert_w39_description);
else if (alert instanceof Maintenance20CartridgeNotInserted)
alertDescription.setText(R.string.alert_m20_description);
else if (alert instanceof Maintenance21CartridgeEmpty)
alertDescription.setText(R.string.alert_m21_description);
else if (alert instanceof Maintenance22BatteryEmpty)
alertDescription.setText(R.string.alert_m22_description);
else if (alert instanceof Maintenance23AutomaticOff)
alertDescription.setText(R.string.alert_m23_description);
else if (alert instanceof Maintenance24Occlusion)
alertDescription.setText(R.string.alert_m24_description);
else if (alert instanceof Maintenance25LoantimeOver)
alertDescription.setText(R.string.alert_m25_description);
else if (alert instanceof Maintenance26CartridgeChangeNotCompleted)
alertDescription.setText(R.string.alert_m26_description);
else if (alert instanceof Maintenance27DataDownloadFailed)
alertDescription.setText(R.string.alert_m27_description);
else if (alert instanceof Maintenance28PauseModeTimeout)
alertDescription.setText(R.string.alert_m28_description);
else if (alert instanceof Maintenance29BatteryTypeNotSet)
alertDescription.setText(R.string.alert_m29_description);
else if (alert instanceof Maintenance30CartridgeTypeNotSet)
alertDescription.setText(R.string.alert_m30_description);
else if (alert instanceof Error6MechanicalError)
alertDescription.setText(R.string.alert_e6_description);
else if (alert instanceof Error10RewindError)
alertDescription.setText(R.string.alert_e10_description);
else if (alert instanceof Error13LanguageError)
alertDescription.setText(R.string.alert_e13_description);
}
Aggregations