Retry monitor and capture setup after invalidating failed attempts. Bind output leases and callbacks to registration identity, cancel confirmation timers, and keep hardware cleanup independent from device enumeration during call handoff.
Commit profiles only after successful storage writes, acquire mode ownership before Android side effects, and reject blocking operations on main or the control worker. Keep the app singleton backed by an isolated MediaAudioSession with a single executor.
Validation: 30 media session scenarios, 420 JVM tests, assembleDebug, core build, and full check.sh (225 tests plus proxy/burst/load) passed.
Bind notification tokens to full call IDs and call kinds, cancel actions on stop, and reject decline callbacks after ringing ends. Serialize alert state on main and recover notification channel setup after Android API failures.
Keep sound independent of wake-lock and notification failures. Remove orphaned notifications on cold start, preserve idempotent alerts during duplicate delivery and language changes, and document lifecycle contracts.
Validation: 32 new lifecycle cases, 360 JVM tests, assembleDebug, core build, and full check.sh (225 tests plus proxy/burst/load) passed.
Configure audio attributes before MediaPlayer preparation, keep vibration independent from sound failures, and guard loop/focus cleanup against stale callbacks. Preserve ringback players on repeated phase requests.
Add 35 alert lifecycle tests against real Kotlin sources with controlled Android API failures. Validation: 328 JVM tests, assembleDebug, core build, and full check.sh (225 tests plus proxy/burst/load) passed. Previous sources fail 32 of the 35 new cases.