Problem
AirPods reconnection constructs a new MediaController, but the playback listener owned by the previous controller loops forever. The per-controller running flag cannot see older instances, so listeners accumulate and can react to the same playback transition concurrently, including overlapping A2DP recovery work.
Expected behavior
Starting a listener for a device should stop the previous listener for the same Bluetooth MAC. Listeners belonging to different connected AirPods must remain independent.
Acceptance criteria
- Reconnecting the same AirPods leaves one active playback listener for that MAC.
- A superseded listener cannot continue into playback takeover side effects.
- Starting a listener for a second MAC does not stop the first device listener.
- The replacement behavior has an automated lifecycle test.
Problem
AirPods reconnection constructs a new MediaController, but the playback listener owned by the previous controller loops forever. The per-controller running flag cannot see older instances, so listeners accumulate and can react to the same playback transition concurrently, including overlapping A2DP recovery work.
Expected behavior
Starting a listener for a device should stop the previous listener for the same Bluetooth MAC. Listeners belonging to different connected AirPods must remain independent.
Acceptance criteria