From 1d53d0f00ce86e871f25dcccd72c811eeb27292f Mon Sep 17 00:00:00 2001 From: avi Date: Tue, 15 Sep 2026 14:39:19 -0500 Subject: [PATCH] Notification: drop duplicate system No/Yes on delete-confirm card - buildConfirm had card buttons + addAction row: shade showed green No/Yes plus black-text No/Yes pair (seen 2026-09-15) - Keep only the card buttons; no system actions on any recording card - Test now asserts zero system actions --- .../shonar/recording/RecordingNotificationHelper.kt | 12 ++++-------- .../recording/RecordingNotificationLayoutTest.kt | 11 ++++++----- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/android/app/src/main/java/com/shonar/recording/RecordingNotificationHelper.kt b/android/app/src/main/java/com/shonar/recording/RecordingNotificationHelper.kt index c9f82f1..74a6719 100644 --- a/android/app/src/main/java/com/shonar/recording/RecordingNotificationHelper.kt +++ b/android/app/src/main/java/com/shonar/recording/RecordingNotificationHelper.kt @@ -226,14 +226,10 @@ object RecordingNotificationHelper { .setCustomBigContentView(card) .setStyle(NotificationCompat.DecoratedCustomViewStyle()) .setPriority(NotificationCompat.PRIORITY_HIGH) - .addAction( - R.drawable.ic_notif_close, "No", - svcIntent(ctx, RecordingService.ACTION_DISCARD_CANCEL, 43), - ) - .addAction( - R.drawable.ic_notif_check, "Yes", - svcIntent(ctx, RecordingService.ACTION_CANCEL, 44), - ) + // No system actions here: the card's own No/Yes are the controls; + // system action rows render a second black-text No/Yes pair + // under the card (seen on-device 2026-09-15). Surfaces that + // can't show custom views get title/text + tap-to-open. .build() } diff --git a/android/app/src/test/java/com/shonar/recording/RecordingNotificationLayoutTest.kt b/android/app/src/test/java/com/shonar/recording/RecordingNotificationLayoutTest.kt index db12c5e..7a169e8 100644 --- a/android/app/src/test/java/com/shonar/recording/RecordingNotificationLayoutTest.kt +++ b/android/app/src/test/java/com/shonar/recording/RecordingNotificationLayoutTest.kt @@ -117,13 +117,14 @@ class RecordingNotificationLayoutTest { } @Test fun ongoingCard_hasNoSystemActionRow() { - // The expanded card's X/pause/check pills are the controls; system - // addAction() rows would duplicate them under the card. Only the - // confirm-delete card (No/Yes) may add actions. + // The expanded card's X/pause/check pills are the controls, and the + // confirm-delete card's No/Yes are its controls; system action rows + // would duplicate them under the card (seen on-device 2026-09-15: + // black-text No/Yes pair under the green card pair). val src = helperSource() assertTrue( - "ongoing card must not add system actions (only confirm-delete's No/Yes)", - src.split(".addAction(").size - 1 == 2, + "no card may add system actions (they duplicate the card buttons)", + ".addAction(" !in src, ) }