fixed notification sounds for Android 6

This commit is contained in:
Daniel Gultsch 2018-09-24 19:47:11 +02:00
parent 5cf64826ac
commit 23b641a6ad
2 changed files with 3 additions and 9 deletions

View File

@ -384,10 +384,12 @@ public class NotificationService {
if (!summaryOnly) { if (!summaryOnly) {
for (Map.Entry<String, ArrayList<Message>> entry : notifications.entrySet()) { for (Map.Entry<String, ArrayList<Message>> entry : notifications.entrySet()) {
String uuid = entry.getKey(); 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) { if (!notifyOnlyOneChild) {
singleBuilder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY); singleBuilder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY);
} }
modifyForSoundVibrationAndLight(singleBuilder, notifyThis, preferences);
singleBuilder.setGroup(CONVERSATIONS_GROUP); singleBuilder.setGroup(CONVERSATIONS_GROUP);
setNotificationColor(singleBuilder); setNotificationColor(singleBuilder);
notify(entry.getKey(), NOTIFICATION_ID, singleBuilder.build()); notify(entry.getKey(), NOTIFICATION_ID, singleBuilder.build());

View File

@ -1,25 +1,17 @@
package eu.siacs.conversations.utils; package eu.siacs.conversations.utils;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.Log; import android.util.Log;
import org.conscrypt.Conscrypt; import org.conscrypt.Conscrypt;
import java.lang.reflect.Method;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import javax.net.ssl.SNIHostName;
import javax.net.ssl.SNIServerName;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import eu.siacs.conversations.Config; import eu.siacs.conversations.Config;
import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Account;