Remove sound from notification channel
This commit is contained in:
parent
5e778f1e76
commit
206813ae4b
2 changed files with 3 additions and 2 deletions
|
@ -129,8 +129,8 @@ public class InsightAlertService extends Service implements InsightConnectionSer
|
||||||
private void queryActiveAlert() {
|
private void queryActiveAlert() {
|
||||||
while (!Thread.currentThread().isInterrupted()) {
|
while (!Thread.currentThread().isInterrupted()) {
|
||||||
try {
|
try {
|
||||||
Alert alert = connectionService.requestMessage(new GetActiveAlertMessage()).await().getAlert();
|
|
||||||
synchronized ($alertLock) {
|
synchronized ($alertLock) {
|
||||||
|
Alert alert = connectionService.requestMessage(new GetActiveAlertMessage()).await().getAlert();
|
||||||
if (alert == null || (alert.getAlertType() == ignoreType && System.currentTimeMillis() - ignoreTimestamp < 10000)) {
|
if (alert == null || (alert.getAlertType() == ignoreType && System.currentTimeMillis() - ignoreTimestamp < 10000)) {
|
||||||
if (connectionRequested) {
|
if (connectionRequested) {
|
||||||
connectionService.withdrawConnectionRequest(this);
|
connectionService.withdrawConnectionRequest(this);
|
||||||
|
|
|
@ -257,6 +257,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
NotificationManager notificationManager = (NotificationManager) MainApp.instance().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager notificationManager = (NotificationManager) MainApp.instance().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
NotificationChannel channel = new NotificationChannel(ALERT_CHANNEL_ID, MainApp.gs(R.string.insight_alert_notification_channel), NotificationManager.IMPORTANCE_HIGH);
|
NotificationChannel channel = new NotificationChannel(ALERT_CHANNEL_ID, MainApp.gs(R.string.insight_alert_notification_channel), NotificationManager.IMPORTANCE_HIGH);
|
||||||
|
channel.setSound(null, null);
|
||||||
notificationManager.createNotificationChannel(channel);
|
notificationManager.createNotificationChannel(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -661,9 +662,9 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
cancelBolusMessage.setBolusID(bolusID);
|
cancelBolusMessage.setBolusID(bolusID);
|
||||||
connectionService.requestMessage(cancelBolusMessage).await();
|
connectionService.requestMessage(cancelBolusMessage).await();
|
||||||
bolusCancelled = true;
|
bolusCancelled = true;
|
||||||
|
confirmAlert(AlertType.WARNING_38);
|
||||||
alertService.ignore(null);
|
alertService.ignore(null);
|
||||||
}
|
}
|
||||||
confirmAlert(AlertType.WARNING_38);
|
|
||||||
} catch (AppLayerErrorException e) {
|
} catch (AppLayerErrorException e) {
|
||||||
log.info("Exception while canceling bolus: " + e.getClass().getCanonicalName() + " (" + e.getErrorCode() + ")");
|
log.info("Exception while canceling bolus: " + e.getClass().getCanonicalName() + " (" + e.getErrorCode() + ")");
|
||||||
} catch (InsightException e) {
|
} catch (InsightException e) {
|
||||||
|
|
Loading…
Reference in a new issue