Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 986b1903 authored by Rongxuan Liu's avatar Rongxuan Liu
Browse files

[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
parent a08fe33a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment