Merge pull request #2563 from jotomo/2.7-upstreaming
Minor improvements
This commit is contained in:
commit
a640095b86
3 changed files with 10 additions and 3 deletions
|
@ -116,6 +116,7 @@ class NotificationStore @Inject constructor(
|
||||||
.setSmallIcon(smallIcon)
|
.setSmallIcon(smallIcon)
|
||||||
.setLargeIcon(largeIcon)
|
.setLargeIcon(largeIcon)
|
||||||
.setContentText(n.text)
|
.setContentText(n.text)
|
||||||
|
.setStyle(NotificationCompat.BigTextStyle().bigText(n.text))
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||||
.setDeleteIntent(deleteIntent(n.id))
|
.setDeleteIntent(deleteIntent(n.id))
|
||||||
if (n.level == Notification.URGENT) {
|
if (n.level == Notification.URGENT) {
|
||||||
|
|
|
@ -941,7 +941,13 @@ public class ComboPlugin extends PumpPluginBase implements PumpInterface, Constr
|
||||||
activeAlert.warningCode == PumpWarningCodes.TBR_CANCELLED)) {
|
activeAlert.warningCode == PumpWarningCodes.TBR_CANCELLED)) {
|
||||||
// turn benign warnings into notifications
|
// turn benign warnings into notifications
|
||||||
notifyAboutPumpWarning(activeAlert);
|
notifyAboutPumpWarning(activeAlert);
|
||||||
ruffyScripter.confirmAlert(activeAlert.warningCode);
|
CommandResult alertConfirmationResult = ruffyScripter.confirmAlert(activeAlert.warningCode);
|
||||||
|
if (!alertConfirmationResult.success) {
|
||||||
|
return alertConfirmationResult;
|
||||||
|
}
|
||||||
|
// while the warning was active the menu data couldn't be read, only after confirmation,
|
||||||
|
// so update the var with it, so the check routines below can work on it
|
||||||
|
preCheckResult = alertConfirmationResult;
|
||||||
} else if (activeAlert.errorCode != null) {
|
} else if (activeAlert.errorCode != null) {
|
||||||
Notification notification = new Notification();
|
Notification notification = new Notification();
|
||||||
notification.date = DateUtil.now();
|
notification.date = DateUtil.now();
|
||||||
|
|
|
@ -160,7 +160,7 @@ public class RuffyScripter implements RuffyCommands {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!boundSucceeded) {
|
if (!boundSucceeded) {
|
||||||
log.error("No connection to ruffy. Pump control unavailable.");
|
log.info("No connection to ruffy. Pump control unavailable.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ public class RuffyScripter implements RuffyCommands {
|
||||||
long cmdEndTime = System.currentTimeMillis();
|
long cmdEndTime = System.currentTimeMillis();
|
||||||
log.debug("Executing " + cmd + " took " + (cmdEndTime - cmdStartTime) + "ms");
|
log.debug("Executing " + cmd + " took " + (cmdEndTime - cmdStartTime) + "ms");
|
||||||
} catch (CommandException e) {
|
} catch (CommandException e) {
|
||||||
log.error("CommandException running command", e);
|
log.info("CommandException running command", e);
|
||||||
cmd.getResult().success = false;
|
cmd.getResult().success = false;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Unexpected exception running cmd", e);
|
log.error("Unexpected exception running cmd", e);
|
||||||
|
|
Loading…
Reference in a new issue