Skip to content
Snippets Groups Projects
Commit 351d68e2 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

notification service: use proper value for hasVideo

Change-Id: I35a4081e3ccfb35d8091f91f2d76775362566f50
parent 99b6004c
No related branches found
No related tags found
No related merge requests found
...@@ -131,6 +131,8 @@ class NotificationServiceImpl( ...@@ -131,6 +131,8 @@ class NotificationServiceImpl(
.setImportant(true) .setImportant(true)
.build() .build()
val hasVideo = conference.hasVideo()
val messageNotificationBuilder: NotificationCompat.Builder val messageNotificationBuilder: NotificationCompat.Builder
if (conference.isOnGoing) { if (conference.isOnGoing) {
messageNotificationBuilder = NotificationCompat.Builder(mContext, NOTIF_CHANNEL_CALL_IN_PROGRESS) messageNotificationBuilder = NotificationCompat.Builder(mContext, NOTIF_CHANNEL_CALL_IN_PROGRESS)
...@@ -151,7 +153,7 @@ class NotificationServiceImpl( ...@@ -151,7 +153,7 @@ class NotificationServiceImpl(
.putExtra(NotificationService.KEY_CALL_ID, call.daemonIdString) .putExtra(NotificationService.KEY_CALL_ID, call.daemonIdString)
.putExtra(ConversationPath.KEY_ACCOUNT_ID, accountId), .putExtra(ConversationPath.KEY_ACCOUNT_ID, accountId),
ContentUriHandler.immutable(PendingIntent.FLAG_ONE_SHOT))) ContentUriHandler.immutable(PendingIntent.FLAG_ONE_SHOT)))
.setIsVideo(conference.hasVideo())) .setIsVideo(hasVideo))
} else if (conference.isRinging) { } else if (conference.isRinging) {
if (conference.isIncoming) { if (conference.isIncoming) {
messageNotificationBuilder = NotificationCompat.Builder(mContext, NOTIF_CHANNEL_INCOMING_CALL) messageNotificationBuilder = NotificationCompat.Builder(mContext, NOTIF_CHANNEL_INCOMING_CALL)
...@@ -174,8 +176,8 @@ class NotificationServiceImpl( ...@@ -174,8 +176,8 @@ class NotificationServiceImpl(
.putExtra(ConversationPath.KEY_ACCOUNT_ID, accountId) .putExtra(ConversationPath.KEY_ACCOUNT_ID, accountId)
.putExtra(NotificationService.KEY_CALL_ID, call.daemonIdString) .putExtra(NotificationService.KEY_CALL_ID, call.daemonIdString)
.putExtra(CallPresenter.KEY_ACCEPT_OPTION, CallPresenter.ACCEPT_HOLD) .putExtra(CallPresenter.KEY_ACCEPT_OPTION, CallPresenter.ACCEPT_HOLD)
.putExtra(CallFragment.KEY_HAS_VIDEO, true), ContentUriHandler.immutable(PendingIntent.FLAG_ONE_SHOT))) .putExtra(CallFragment.KEY_HAS_VIDEO, hasVideo), ContentUriHandler.immutable(PendingIntent.FLAG_ONE_SHOT)))
.setIsVideo(conference.hasVideo())) .setIsVideo(hasVideo))
} else { } else {
messageNotificationBuilder = NotificationCompat.Builder(mContext, NOTIF_CHANNEL_CALL_IN_PROGRESS) messageNotificationBuilder = NotificationCompat.Builder(mContext, NOTIF_CHANNEL_CALL_IN_PROGRESS)
.setContentTitle(mContext.getString(R.string.notif_outgoing_call_title, contact.displayName)) .setContentTitle(mContext.getString(R.string.notif_outgoing_call_title, contact.displayName))
...@@ -192,7 +194,7 @@ class NotificationServiceImpl( ...@@ -192,7 +194,7 @@ class NotificationServiceImpl(
.putExtra(NotificationService.KEY_CALL_ID, call.daemonIdString) .putExtra(NotificationService.KEY_CALL_ID, call.daemonIdString)
.putExtra(ConversationPath.KEY_ACCOUNT_ID, accountId), .putExtra(ConversationPath.KEY_ACCOUNT_ID, accountId),
ContentUriHandler.immutable(PendingIntent.FLAG_ONE_SHOT))) ContentUriHandler.immutable(PendingIntent.FLAG_ONE_SHOT)))
.setIsVideo(conference.hasVideo())) .setIsVideo(hasVideo))
.setColor(ContextCompat.getColor(mContext, R.color.color_primary_light)) .setColor(ContextCompat.getColor(mContext, R.color.color_primary_light))
} }
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment