summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-10-20 08:04:06 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-10-20 08:04:06 +0000
commit37136b152e923f784ad4056f9deddfab1d7f1e8c (patch)
tree4437ad2095d1de6242cbd2d89ec04e74fce7f3d1 /docs
parentd53a8c54351ccf5e0ecfd890abe53e13c65c60fa (diff)
Add a "this is an ad" button to the notification
The notification carried four buttons doing two jobs: Media3's default previous/next (which PodcastPlayer redefines as seek) plus our own back-15/forward-25 pair. Media button preferences with explicit slots let the custom pair claim the two seek slots, so the duplicates go and the freed space carries "this is an ad". No player command is removed to achieve it, which is the route that once silently killed the headphone skip button. One press means four things, told apart by where the playhead lands rather than by guessing: press claims advertising from here and jumps past it, pressing again extends the same claim, coming back inside the jump moves its end to where you landed, and coming back past the press withdraws it. Outside a 20-second window a seek is ordinary navigation and says nothing. The window is stored with the label so changing it later cannot reinterpret old data. Every backwards seek feeds the gesture, whatever caused it -- notification, headphone remote, in-app bar, dragged slider -- because you correct with whatever is to hand. This is the opposite evidence to the tap-a-break popup. That one can only correct breaks detection already found, and detection accounts for about 38% of the advertising the feeds imply. Verified on the emulator: the notification now shows exactly back-15, pause, forward-25 and the new button; the lock screen shows it too and pressing it there records a claim without unlocking; all four gesture arms behave as specified; and the media transport keys still seek by 25s and 15s. Android Auto still needs the car. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'docs')
-rw-r--r--docs/superpowers/plans/2026-10-20-corrections-and-signature-library.md30
1 files changed, 23 insertions, 7 deletions
diff --git a/docs/superpowers/plans/2026-10-20-corrections-and-signature-library.md b/docs/superpowers/plans/2026-10-20-corrections-and-signature-library.md
index 6dea531..cd79f1e 100644
--- a/docs/superpowers/plans/2026-10-20-corrections-and-signature-library.md
+++ b/docs/superpowers/plans/2026-10-20-corrections-and-signature-library.md
@@ -60,7 +60,7 @@ Tapping a break mark opens metadata and a verdict. Detail in the dispatch; the p
- **Verdicts stay local for now.** No endpoint, no consumer. Storing them from today means a
corpus exists by the time the library does.
-### 1b. "This is an ad" in the notification — NOT STARTED
+### 1b. "This is an ad" in the notification — DONE 2026-10-20
Peter, 2026-10-20: *"The notification currently has duplicate skip buttons (our custom ones plus
forward/back) - there's UI space for explicit 'this is an ad' there."*
@@ -71,12 +71,28 @@ forward/back) - there's UI space for explicit 'this is an ad' there."*
`NotificationControls.customLayout()` publishes a second seek-back-15 / forward-25 pair on top.
Reclaiming a slot means dropping one pair.
-**Do this on a device, carefully.** `ListenSessionCallback` carries a comment recording that
-removing commands to free notification slots once silently killed the headphone skip button.
-Whichever pair goes, verify: the notification, the lock screen, Bluetooth/headphone transport,
-and Android Auto. Note also that that comment currently contradicts its own code — it says "Only
-previous-media-item goes" while the code removes both previous and next. Worth resolving while
-in there.
+**How the slot was reclaimed — no command was removed at all.** Media3 1.8 has media button
+*preferences*: a `CommandButton` claiming `SLOT_BACK` or `SLOT_FORWARD` takes that slot instead
+of the default previous/next button (`DefaultMediaNotificationProvider.getMediaButtons` checks
+`CommandButton.containsButtonForSlot` before adding its own). So `setCustomLayout` became
+`setMediaButtonPreferences`, the custom back-15 / forward-25 pair claimed the two seek slots, the
+duplicate defaults disappeared, and "This is an ad" went in `SLOT_FORWARD_SECONDARY` falling back
+to `SLOT_OVERFLOW`. Player commands are untouched, so the headphone regression that comment warns
+about cannot recur by this route. The comment's contradiction was resolved while in there.
+
+**Verified on the emulator, 2026-10-20.** Notification actions are now exactly
+`[Back 15 seconds] [Pause] [Forward 25 seconds] [This is an ad]` — four, not five. The platform
+session carries all three custom actions, so the shade and lock-screen players show the
+circle-and-slash button, and pressing it **from the lock screen without unlocking** recorded a
+claim. All four gesture arms confirmed live, plus "nothing written" for a seek-back outside the
+window. Headphone/Bluetooth transport keys still seek: `KEYCODE_MEDIA_NEXT` +25s,
+`KEYCODE_MEDIA_PREVIOUS` -15s.
+
+**Android Auto is NOT verified** — it needs the real car. The risk is low (player commands,
+browse tree and custom actions are all unchanged or strictly added to) but it is not zero.
+
+**What the default jump is.** 45s, three 15-second units, when nothing better is known; the end
+of the detected break when the press lands inside one. See `AdJump`.
**Why this button matters more than the popup.** They catch opposite errors: