AudioService: Add makeHearingAidDeviceUnavailableLater
Currently, when Hearing Aid 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 Hearing Aid.
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 Hearing Aid code path, and split
makeHearingAidDeviceUnavailable into *Now and *Later versions.
Bug:361198689
Test: Disconnect Bluetooth when playing music while connected to a hearing aid, see if there is sound coming from the speaker.
Change-Id: I3446249f3dd1033079188fb87a7471456d38dab7
Signed-off-by:
chenxin20 <chenxin20@xiaomi.com>
Loading
Please register or sign in to comment