Skip to content

Commit

Permalink
Crash on unexpected action
Browse files Browse the repository at this point in the history
Signed-off-by: mueller-ma <[email protected]>
  • Loading branch information
mueller-ma committed Jul 10, 2024
1 parent a9a0e61 commit f16d7f5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ class NotificationHandlingReceiver : BroadcastReceiver() {
is CloudNotificationAction.Action.UrlAction ->
action.url.toUri().openInBrowser(context)
else -> {
// TODO
Log.e(TAG, "Not yet implemented")
throw IllegalArgumentException("Got unexpected action: $action")
}
}
}
Expand Down Expand Up @@ -103,7 +102,7 @@ class NotificationHandlingReceiver : BroadcastReceiver() {
else -> {
val intent = Intent(context, NotificationHandlingReceiver::class.java).apply {
action = ACTION_NOTIF_ACTION
putExtra(EXTRA_NOTIFICATION_ID, notificationId)
putExtra(EXTRA_NOTIFICATION_ID, notificationId.notificationId)
putExtra(EXTRA_NOTIFICATION_ACTION, cna)
}
PendingIntent.getBroadcast(
Expand Down

0 comments on commit f16d7f5

Please sign in to comment.