From e2a7ed86e459d631f8136657f8d4476a7b098613 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Fri, 9 Sep 2022 12:40:46 -0400 Subject: [PATCH] Promote ongoing call notification to high priority. --- .../securesms/webrtc/CallNotificationBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallNotificationBuilder.java b/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallNotificationBuilder.java index 3253abdf92..ec3d681d3f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/webrtc/CallNotificationBuilder.java @@ -43,7 +43,7 @@ public class CallNotificationBuilder { PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, contentIntent, 0); - NotificationCompat.Builder builder = new NotificationCompat.Builder(context, getNotificationChannel(context, type)) + NotificationCompat.Builder builder = new NotificationCompat.Builder(context, getNotificationChannel(type)) .setSmallIcon(R.drawable.ic_call_secure_white_24dp) .setContentIntent(pendingIntent) .setOngoing(true) @@ -119,8 +119,8 @@ public class CallNotificationBuilder { return notificationId == WEBRTC_NOTIFICATION || notificationId == WEBRTC_NOTIFICATION_RINGING; } - private static @NonNull String getNotificationChannel(@NonNull Context context, int type) { - if (callActivityRestricted() && type == TYPE_INCOMING_RINGING) { + private static @NonNull String getNotificationChannel(int type) { + if ((callActivityRestricted() && type == TYPE_INCOMING_RINGING) || type == TYPE_ESTABLISHED) { return NotificationChannels.CALLS; } else { return NotificationChannels.CALL_STATUS;