Skip to content

fix: adaptive icon, tile cold start, back-exit shutdown (#8, #13, #9) - #15

Merged
jaimebg merged 9 commits into
mainfrom
fix/icon-tile-back-exit
Sep 17, 2026
Merged

jaimebg merged 9 commits into
mainfrom
fix/icon-tile-back-exit

Conversation

@jaimebg

@jaimebg jaimebg commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Fixes #8, fixes #13, fixes #9.

#8 Adaptive icon. The foreground layer had a pale rounded square baked in and the background layer was purple, so launchers drew a square on a circle. The square is keyed out of the foreground at all five densities and the background is a flat fill of the same pale green. Monochrome and legacy icons unchanged.

#13 Quick Settings tile. Media3's MediaButtonReceiver cannot start the service from a background broadcast on Android 12+ (ForegroundServiceStartNotAllowedException, swallowed). When nothing is playing, the tile now starts an invisible TilePlayActivity that starts AudioService with an explicit ACTION_PLAY_STORED_MIX. The service registers its session (addSession) and loads the stored mix, so the last mix plays with no app UI, also from the lock screen. The trampoline's launch intent carries a category that onTaskRemoved recognises, since that task is removed the instant the activity finishes. While playing, the tile still broadcasts, so pausing keeps the panel open.

Two designs were tried and rejected on the way, both documented in code comments: a media-button intent (Media3 intercepts play on an empty player before it reaches MixPlayer) and a timing flag around the mix load (racy).

#9 Background service. Backing out of the app after Stop now stops the service: MediaSession.Callback.onDisconnected stops it when a non-notification controller leaves a STATE_IDLE player. A paused mix keeps its notification and process on purpose.

No version bump here; 2.1 is cut once the sibling PR lands.

Verified on an API 36 emulator (Medium_Phone_API36): launcher icon; tile cold start with foreground notification and no app UI; pause and resume from the tile; lock-screen start with a PIN set; Stop then Back leaves no service; pause then Back keeps service and notification. ./gradlew assembleDebug lint test assembleRelease green, 484 unit tests.

Known, out of scope: pressing Back within the 3 s stop fade cancels the fade's stop and the mix keeps playing (pre-existing, in AudioServiceConnection). Worth its own issue.

@jaimebg
jaimebg merged commit f82e831 into main Sep 17, 2026
3 checks passed
@jaimebg
jaimebg deleted the fix/icon-tile-back-exit branch September 17, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Useless quick settings tile Background service after exiting the app Problematic adaptive icon

1 participant