Skip to content

Commit 46d1795

Browse files
committed
Fix crash due to missing notification
Thread: main, Exception: java.lang.RuntimeException: Unable to start service org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService@3d1f0bc with Intent { cmp=im.vector.app.debug/org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService (has extras) }: java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=JitsiOngoingConferenceChannel pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0x00000000 category=call actions=2 vis=PUBLIC semFlags=0x0 semPriority=0 semMissedCount=0)
1 parent 6b34bb2 commit 46d1795

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

vector-app/src/debug/java/im/vector/app/features/debug/DebugMenuActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
179179
.setContentText("Content")
180180
// No effect because it's a group summary notif
181181
.setNumber(33)
182-
.setSmallIcon(R.drawable.ic_status_bar)
182+
.setSmallIcon(R.drawable.ic_notification)
183183
// This provocate the badge issue: no badge for group notification
184184
.setGroup("GroupKey")
185185
.setGroupSummary(true)
@@ -212,7 +212,7 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
212212
// For shortcut on long press on launcher icon
213213
.setBadgeIconType(NotificationCompat.BADGE_ICON_NONE)
214214
.setStyle(messagingStyle1)
215-
.setSmallIcon(R.drawable.ic_status_bar)
215+
.setSmallIcon(R.drawable.ic_notification)
216216
.setGroup("GroupKey")
217217
.build()
218218
)
@@ -224,7 +224,7 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
224224
.setContentTitle("Title 2")
225225
.setContentText("Content 2")
226226
.setStyle(messagingStyle2)
227-
.setSmallIcon(R.drawable.ic_status_bar)
227+
.setSmallIcon(R.drawable.ic_notification)
228228
.setGroup("GroupKey")
229229
.build()
230230
)

vector/src/main/java/im/vector/app/features/notifications/NotificationUtils.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ class NotificationUtils @Inject constructor(
582582
val accentColor = ContextCompat.getColor(context, R.color.notification_accent_color)
583583
// Build the pending intent for when the notification is clicked
584584
val openRoomIntent = buildOpenRoomIntent(roomInfo.roomId)
585-
val smallIcon = R.drawable.ic_status_bar
585+
val smallIcon = R.drawable.ic_notification
586586

587587
val channelID = if (roomInfo.shouldBing) NOISY_NOTIFICATION_CHANNEL_ID else SILENT_NOTIFICATION_CHANNEL_ID
588588
return NotificationCompat.Builder(context, channelID)
@@ -695,7 +695,7 @@ class NotificationUtils @Inject constructor(
695695
): Notification {
696696
val accentColor = ContextCompat.getColor(context, R.color.notification_accent_color)
697697
// Build the pending intent for when the notification is clicked
698-
val smallIcon = R.drawable.ic_status_bar
698+
val smallIcon = R.drawable.ic_notification
699699

700700
val channelID = if (inviteNotifiableEvent.noisy) NOISY_NOTIFICATION_CHANNEL_ID else SILENT_NOTIFICATION_CHANNEL_ID
701701

@@ -775,7 +775,7 @@ class NotificationUtils @Inject constructor(
775775
): Notification {
776776
val accentColor = ContextCompat.getColor(context, R.color.notification_accent_color)
777777
// Build the pending intent for when the notification is clicked
778-
val smallIcon = R.drawable.ic_status_bar
778+
val smallIcon = R.drawable.ic_notification
779779

780780
val channelID = if (simpleNotifiableEvent.noisy) NOISY_NOTIFICATION_CHANNEL_ID else SILENT_NOTIFICATION_CHANNEL_ID
781781

@@ -890,7 +890,7 @@ class NotificationUtils @Inject constructor(
890890
lastMessageTimestamp: Long
891891
): Notification {
892892
val accentColor = ContextCompat.getColor(context, R.color.notification_accent_color)
893-
val smallIcon = R.drawable.ic_status_bar
893+
val smallIcon = R.drawable.ic_notification
894894

895895
return NotificationCompat.Builder(context, if (noisy) NOISY_NOTIFICATION_CHANNEL_ID else SILENT_NOTIFICATION_CHANNEL_ID)
896896
.setOnlyAlertOnce(true)
@@ -980,7 +980,7 @@ class NotificationUtils @Inject constructor(
980980
NotificationCompat.Builder(context, NOISY_NOTIFICATION_CHANNEL_ID)
981981
.setContentTitle(stringProvider.getString(R.string.app_name))
982982
.setContentText(stringProvider.getString(R.string.settings_troubleshoot_test_push_notification_content))
983-
.setSmallIcon(R.drawable.ic_status_bar)
983+
.setSmallIcon(R.drawable.ic_notification)
984984
.setLargeIcon(getBitmap(context, R.drawable.element_logo_green))
985985
.setColor(ContextCompat.getColor(context, R.color.notification_accent_color))
986986
.setPriority(NotificationCompat.PRIORITY_MAX)

0 commit comments

Comments
 (0)