diff options
| author | 2025-01-17 18:39:42 +0800 | |
|---|---|---|
| committer | 2025-01-28 19:34:51 -0800 | |
| commit | 2f4d2f19c9b5833f1c5770a076cecd35931c39f2 (patch) | |
| tree | 7a0ec48f126d1aaf9eaca96aea77c58e89759442 /libs/androidfw/StringPool.cpp | |
| parent | ddf806d91c4685fac341bde01aa83b953687c89a (diff) | |
Register listener on `onBroadcastMetadataChanged` when audio sharing is triggered instead of after `isAudioSharingOn`.
There are two reasons for this change:
1) there is a chance that `onBroadcastMetadataChanged` callback is missed if it's registered after audio sharing is turned on, as it's fires right after `onBroadcastStarted` (`isAudioSharingOn` emits true)
2) this will also fix a race condition where the settings app triggered `onBroadcastMetadataChanged` before the bluetooth dialog is fully closed. This could happen when user clicks on the "Share Audio" button on the dialog (which leads them to settings and starts audio sharing automatically, in this case, both settings and systemui would perform addSource).
Test: atest
Bug: b/381927583 b/390343739
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I6deed1046ec7d4c5543306a20558c29d68a1e2d7
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions