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:
parent
ffea797eba
commit
1d53d0f00c
2 changed files with 10 additions and 13 deletions
|
|
@ -226,14 +226,10 @@ object RecordingNotificationHelper {
|
||||||
.setCustomBigContentView(card)
|
.setCustomBigContentView(card)
|
||||||
.setStyle(NotificationCompat.DecoratedCustomViewStyle())
|
.setStyle(NotificationCompat.DecoratedCustomViewStyle())
|
||||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||||
.addAction(
|
// No system actions here: the card's own No/Yes are the controls;
|
||||||
R.drawable.ic_notif_close, "No",
|
// system action rows render a second black-text No/Yes pair
|
||||||
svcIntent(ctx, RecordingService.ACTION_DISCARD_CANCEL, 43),
|
// under the card (seen on-device 2026-09-15). Surfaces that
|
||||||
)
|
// can't show custom views get title/text + tap-to-open.
|
||||||
.addAction(
|
|
||||||
R.drawable.ic_notif_check, "Yes",
|
|
||||||
svcIntent(ctx, RecordingService.ACTION_CANCEL, 44),
|
|
||||||
)
|
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,13 +117,14 @@ class RecordingNotificationLayoutTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun ongoingCard_hasNoSystemActionRow() {
|
@Test fun ongoingCard_hasNoSystemActionRow() {
|
||||||
// The expanded card's X/pause/check pills are the controls; system
|
// The expanded card's X/pause/check pills are the controls, and the
|
||||||
// addAction() rows would duplicate them under the card. Only the
|
// confirm-delete card's No/Yes are its controls; system action rows
|
||||||
// confirm-delete card (No/Yes) may add actions.
|
// 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()
|
val src = helperSource()
|
||||||
assertTrue(
|
assertTrue(
|
||||||
"ongoing card must not add system actions (only confirm-delete's No/Yes)",
|
"no card may add system actions (they duplicate the card buttons)",
|
||||||
src.split(".addAction(").size - 1 == 2,
|
".addAction(" !in src,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue