src/com/android/settings/connecteddevice/audiosharing/AudioSharingCallAudioPreferenceController.java
+1
−1
+1
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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