The music pauses when a wireless car ends the session, instead of playing on out of the phone's speaker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HawkandClaude Opus 5.5 committed 2026-11-22 15:56:09 -08:00
1 parent 4e3f8e6657
commit d72738a2da
1 file changed
+3
@@ -183,6 +183,9 @@ class GearslipRunner(
// The car is gone, but nothing calls stop() when a wireless session drops: it waits // The car is gone, but nothing calls stop() when a wireless session drops: it waits
// for the next one. Close the music channel now, so the audio capture behind it, // for the next one. Close the music channel now, so the audio capture behind it,
// and the screen sharing Android shows for it, stop too (issue #43). // and the screen sharing Android shows for it, stop too (issue #43).
// Pause the music first, as stop() does: a SOOEMAKA switched off with the car, and
// the song played on, out of the phone's speaker once Gearslip gave it back.
if (!stopped && state == State.DONE) CarServices.pausePhoneMedia()
if (!stopped) audioLink?.close() if (!stopped) audioLink?.close()
writer.shutdown() writer.shutdown()
if (drainWriterOnExit) writer.awaitTermination(2, TimeUnit.SECONDS) if (drainWriterOnExit) writer.awaitTermination(2, TimeUnit.SECONDS)