summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author jasonwshsu <jasonwshsu@google.com> 2023-05-15 05:30:49 +0800
committer jasonwshsu <jasonwshsu@google.com> 2023-05-16 00:07:03 +0800
commitc61fb84113654374b5869399a7b3de7b0ddba911 (patch)
tree4393a57a2f86da61dbc0bc81abb05142c14e97d8 /libs/androidfw/FileStream.cpp
parent619bfd9214ec3cf86cb0aa783a57b12247d1bc2a (diff)
Fix Audio output sometimes fails to apply when bluetooth re-enabled
Root Cause: AudioManager#getDevices(AudioManager.GET_DEVICES_OUTPUTS) is not guarantee to return the expected device after receiving profile STATE_CONNECTING broadcast. It will cause HearingAidAudioRoutingHelper#getMatchedHearingDeviceAttributes() can not find the expected output hearing device. Solution: Listen to AudioDeviceCallback#onAudioDevicesAdded(). It was listened by HearingAidService and sent broadcast intent BluetoothHearingAid.ACTION_ACTIVE_DEVICE_CHANGED. Use SettingsLib onActiveDeviceChanged() to handle it. Bug: 282547878 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER="(BluetoothEventManagerTest|CachedBluetoothDeviceManagerTest|HearingAidDeviceManagerTest)" Change-Id: I47a500e855b94becf979392d67c317533e0ce2a9
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions