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
This commit is contained in:
avi 2026-09-15 14:39:19 -05:00
commit 1d53d0f00c
2 changed files with 10 additions and 13 deletions

View file

@ -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()
}

View file

@ -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,
)
}