mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-23 19:26:17 +00:00
Promote ongoing call notification to high priority.
This commit is contained in:
committed by
Greyson Parrelli
parent
95b0639ab4
commit
e2a7ed86e4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user