From 23b641a6adcd639188acd3a3b44cb0c89edd007d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 24 Sep 2018 19:47:11 +0200 Subject: [PATCH] fixed notification sounds for Android 6 --- .../siacs/conversations/services/NotificationService.java | 4 +++- .../eu/siacs/conversations/utils/SSLSocketHelper.java | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index dc9899e5e..98fac89a0 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -384,10 +384,12 @@ public class NotificationService { if (!summaryOnly) { for (Map.Entry> entry : notifications.entrySet()) { String uuid = entry.getKey(); - Builder singleBuilder = buildSingleConversations(entry.getValue(), notifyOnlyOneChild ? conversations.contains(uuid) : notify); + final boolean notifyThis = notifyOnlyOneChild ? conversations.contains(uuid) : notify; + Builder singleBuilder = buildSingleConversations(entry.getValue(),notifyThis); if (!notifyOnlyOneChild) { singleBuilder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY); } + modifyForSoundVibrationAndLight(singleBuilder, notifyThis, preferences); singleBuilder.setGroup(CONVERSATIONS_GROUP); setNotificationColor(singleBuilder); notify(entry.getKey(), NOTIFICATION_ID, singleBuilder.build()); diff --git a/src/main/java/eu/siacs/conversations/utils/SSLSocketHelper.java b/src/main/java/eu/siacs/conversations/utils/SSLSocketHelper.java index 20ad8de02..75843ad80 100644 --- a/src/main/java/eu/siacs/conversations/utils/SSLSocketHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/SSLSocketHelper.java @@ -1,25 +1,17 @@ package eu.siacs.conversations.utils; -import android.os.Build; -import android.support.annotation.RequiresApi; import android.util.Log; import org.conscrypt.Conscrypt; -import java.lang.reflect.Method; import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.Collection; -import java.util.Collections; import java.util.LinkedList; -import javax.net.ssl.SNIHostName; -import javax.net.ssl.SNIServerName; import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; import eu.siacs.conversations.Config; import eu.siacs.conversations.entities.Account;