[le audio broadcast] Avoid unexpected device activation when starting broadcast
Before starting broadcast session, current active device will be inactivated first. ActiveDeviceManager will set the other device to be active once the previous device is inactivated. When broadcast is starting, we should avoid such unexpected device activation by checking both isBroadcastActive() -> broadcast active and isBroadcastReadyToBeReActivated() -> broadcast to be activated. With this change, the sequence is 1. App requests to start broadcast with 2 group, A(active fallback) & B 2. Stack will set A to be inactive 3. ActiveDeviceManager check isBroadcastingAudio(), isBroadcastActive() -> false and isBroadcastReadyToBeReActivated() -> true, and skip switching active device to B 4. Once A is inactivated, LEA service will continue to start broadcast, isBroadcastActive() -> true. Bug: 399677373 Flag: EXEMPT, trivial fix covered by unit tests Test: atest ActiveDeviceManagerTest Change-Id: I04a68a78743597030bab91fafa0890b3f5b6c78d
Loading
Please register or sign in to comment