Loading packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt +6 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,12 @@ class AudioSharingRepositoryImpl( isAudioSharingProfilesReady.flatMapLatest { ready -> if (ready) { btManager.profileManager.leAudioProfile.onBroadcastToUnicastFallbackGroupChanged .onStart { emit(BluetoothCsipSetCoordinator.GROUP_ID_INVALID) } .onStart { emit( btManager.profileManager .leAudioProfile.broadcastToUnicastFallbackGroup ) } .flowOn(backgroundCoroutineContext) } else { flowOf(BluetoothCsipSetCoordinator.GROUP_ID_INVALID) Loading packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/AudioSharingRepositoryTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ class AudioSharingRepositoryTest { `when`(assistant.isProfileReady).thenReturn(true) `when`(volumeControl.isProfileReady).thenReturn(true) `when`(leAudio.isProfileReady).thenReturn(true) `when`(leAudio.broadcastToUnicastFallbackGroup).thenReturn(TEST_GROUP_ID_INVALID) val groupIds = mutableListOf<Int?>() underTest.primaryGroupId.onEach { groupIds.add(it) }.launchIn(backgroundScope) runCurrent() Loading Loading
packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt +6 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,12 @@ class AudioSharingRepositoryImpl( isAudioSharingProfilesReady.flatMapLatest { ready -> if (ready) { btManager.profileManager.leAudioProfile.onBroadcastToUnicastFallbackGroupChanged .onStart { emit(BluetoothCsipSetCoordinator.GROUP_ID_INVALID) } .onStart { emit( btManager.profileManager .leAudioProfile.broadcastToUnicastFallbackGroup ) } .flowOn(backgroundCoroutineContext) } else { flowOf(BluetoothCsipSetCoordinator.GROUP_ID_INVALID) Loading
packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/AudioSharingRepositoryTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ class AudioSharingRepositoryTest { `when`(assistant.isProfileReady).thenReturn(true) `when`(volumeControl.isProfileReady).thenReturn(true) `when`(leAudio.isProfileReady).thenReturn(true) `when`(leAudio.broadcastToUnicastFallbackGroup).thenReturn(TEST_GROUP_ID_INVALID) val groupIds = mutableListOf<Int?>() underTest.primaryGroupId.onEach { groupIds.add(it) }.launchIn(backgroundScope) runCurrent() Loading