kopia lustrzana https://github.com/ryukoposting/Signal-Android
Promote ongoing call notification to high priority.
rodzic
95b0639ab4
commit
e2a7ed86e4
|
@ -43,7 +43,7 @@ public class CallNotificationBuilder {
|
||||||
|
|
||||||
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, contentIntent, 0);
|
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)
|
.setSmallIcon(R.drawable.ic_call_secure_white_24dp)
|
||||||
.setContentIntent(pendingIntent)
|
.setContentIntent(pendingIntent)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
@ -119,8 +119,8 @@ public class CallNotificationBuilder {
|
||||||
return notificationId == WEBRTC_NOTIFICATION || notificationId == WEBRTC_NOTIFICATION_RINGING;
|
return notificationId == WEBRTC_NOTIFICATION || notificationId == WEBRTC_NOTIFICATION_RINGING;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @NonNull String getNotificationChannel(@NonNull Context context, int type) {
|
private static @NonNull String getNotificationChannel(int type) {
|
||||||
if (callActivityRestricted() && type == TYPE_INCOMING_RINGING) {
|
if ((callActivityRestricted() && type == TYPE_INCOMING_RINGING) || type == TYPE_ESTABLISHED) {
|
||||||
return NotificationChannels.CALLS;
|
return NotificationChannels.CALLS;
|
||||||
} else {
|
} else {
|
||||||
return NotificationChannels.CALL_STATUS;
|
return NotificationChannels.CALL_STATUS;
|
||||||
|
|
Ładowanie…
Reference in New Issue