use bigger buttons at notifications accept/decline buttons

This commit is contained in:
tibbi
2022-05-27 19:02:17 +02:00
parent ebf827399a
commit 35da1c86a8
3 changed files with 6 additions and 4 deletions

View File

@ -56,8 +56,8 @@ class CallNotificationManager(private val context: Context) {
val declinePendingIntent =
PendingIntent.getBroadcast(context, DECLINE_CALL_CODE, declineCallIntent, PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE)
var callerName = if (callContact != null && callContact.name.isNotEmpty()) callContact.name else context.getString(R.string.unknown_caller)
if (callContact?.numberLabel?.isNotEmpty() == true) {
var callerName = if (callContact.name.isNotEmpty()) callContact.name else context.getString(R.string.unknown_caller)
if (callContact.numberLabel.isNotEmpty()) {
callerName += " - ${callContact.numberLabel}"
}
@ -85,7 +85,7 @@ class CallNotificationManager(private val context: Context) {
val builder = NotificationCompat.Builder(context, channelId)
.setSmallIcon(R.drawable.ic_phone_vector)
.setContentIntent(openAppPendingIntent)
.setPriority(if(isHighPriority) NotificationCompat.PRIORITY_MAX else NotificationCompat.PRIORITY_DEFAULT)
.setPriority(if (isHighPriority) NotificationCompat.PRIORITY_MAX else NotificationCompat.PRIORITY_DEFAULT)
.setCategory(Notification.CATEGORY_CALL)
.setCustomContentView(collapsedView)
.setOngoing(true)