Promote ongoing call notification to high priority.

fork-5.53.8
Cody Henthorne 2022-09-09 12:40:46 -04:00 zatwierdzone przez Greyson Parrelli
rodzic 95b0639ab4
commit e2a7ed86e4
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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;