Skip to content
Commit 8c14a820 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Jakub Pawłowski
Browse files

AudioService: Add makeLeAudioDeviceUnavailableLater

Currently, when LE Audio device becomes unavaliable due to BT adapter
disable, user can hear audio from device speaker for a split second.
This is because we make device unavaliable immediately for LE Audio.
Instead, it should become unavaliable after AUDIO_BECOMING_NOISY intent
is sent.

Since this is working correctly for A2DP, fix is to copy solution from
there for LE Audio code path, and split makeLeAudioDeviceUnavailable
into *Now and *Later versions.

With this fix, the device becomes unavaliable after the noisy intent,
and audio glitch is not heard from speaker.

Example dumpsys audio logs after fix is applied:

02-16 11:25:43:022 broadcast ACTION_AUDIO_BECOMING_NOISY
02-16 11:25:44:050 LE Audio device addr=14:3F:A6:60:0A:A5 made unavailable

Bug: 263209656
Test: play music in Spotfiy, listen on LE Audio device, then disable
Bluetooth. Verify that audio is not heard from the phoen speaker

Change-Id: I0ff85798c3672b2d6862460c2f2d914f705aac2c
(cherry picked from commit 7fb3968a)
parent 7137d916
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment