mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-14 06:16:20 -06:00
onUnpaired was assigned twice in setupServiceCallbacks. The later assignment silently replaced the first, so the handler added earlier this week to surface WHY the server refused a device — the one whose comment says "Only ProvisioningActivity ever assigned onUnpaired, and it is gone by the time playback is running" — could never run. Thirty lines below it, something else was assigning exactly that. What actually executed cleared the offline playlist cache and jumped to the pairing screen on EVERY rejection. That is wrong for the case the service is explicitly built to survive: handleServerRejection parses a settle window, sets awaitingRepair, holds all registration and schedules a single retry, so a reclaim-settle hold recovers on its own within the window. Tearing the player down over it cost the panel the cache it would have replayed from and forced a full re-download after re-pairing — the opposite of what the hold is for. The two are now one handler. It always surfaces the server's reason, and only navigates to provisioning when the rejection is terminal and not a block: transient the service recovers by itself; show the reason and stay put blocked a block deliberately survives a re-pair, so the pairing screen cannot resolve it terminal the device really is gone and the operator needs the code The cache is kept in every case. It is what lets a screen keep showing content while someone walks over to re-pair it, and re-pairing restores the settings anyway. The service now exposes whether a rejection carried a settle window, since only it can know. 4 tests over the decision, kept pure so it needs no Activity. 130 Android JVM tests green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uaeo9MvzKoyXuN6ZsbhtkL |
||
|---|---|---|
| .. | ||
| app | ||
| gradle/wrapper | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| settings.gradle.kts | ||