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

Skip to content
Commit 96429c65 authored by Yiyi Shen's avatar Yiyi Shen
Browse files

[Audiosharing] Save user preferred primary headset to SettingsProvider

In hysteresis mode, we will receive plenty of onReceiveStateChanged, e.g. play and pause music, system sounds... The onReceiveStateChanged with BIS >= 1, as a replacement of onSourceAdded, will trigger auto pick logic for primary headset. In some cases, when user change primary headset in Call audio section on audio sharing page under the hysteresis mode, the system sound will later trigger a onReceiveStateChanged with BIS >= 1, then the auto pick logic (always pick the earliest connected headset) is possible to override the user change. Thus here we have to save the user preferred primary headset in SettingsProvider and skip the auto pick if user has made changes.

Test: atest
Bug: 355222285
Flag: com.android.settingslib.flags.audio_sharing_hysteresis_mode_fix
Change-Id: I5ccf743eb685509ffcc3c7a88051726c10fe2567
parent c349422e
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