diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java index 73857f2c2a7..f0910e78666 100644 --- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java @@ -350,15 +350,23 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll } LocalBluetoothProfile asha = mProfileManager.getHearingAidProfile(); + LocalBluetoothProfile broadcastAssistant = + mProfileManager.getLeAudioBroadcastAssistantProfile(); for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { Log.d(TAG, "device:" + leAudioDevice.getDevice().getAnonymizedAddress() - + "disable LE profile"); + + " disable LE profile"); profile.setEnabled(leAudioDevice.getDevice(), false); if (asha != null) { asha.setEnabled(leAudioDevice.getDevice(), true); } + if (broadcastAssistant != null) { + Log.d(TAG, + "device:" + leAudioDevice.getDevice().getAnonymizedAddress() + + " disable LE broadcast assistant profile"); + broadcastAssistant.setEnabled(leAudioDevice.getDevice(), false); + } } if (!SystemProperties.getBoolean(ENABLE_DUAL_MODE_AUDIO, false)) { @@ -385,15 +393,23 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll disableProfileBeforeUserEnablesLeAudio(mProfileManager.getHeadsetProfile()); } LocalBluetoothProfile asha = mProfileManager.getHearingAidProfile(); + LocalBluetoothProfile broadcastAssistant = + mProfileManager.getLeAudioBroadcastAssistantProfile(); for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { Log.d(TAG, "device:" + leAudioDevice.getDevice().getAnonymizedAddress() - + "enable LE profile"); + + " enable LE profile"); profile.setEnabled(leAudioDevice.getDevice(), true); if (asha != null) { asha.setEnabled(leAudioDevice.getDevice(), false); } + if (broadcastAssistant != null) { + Log.d(TAG, + "device:" + leAudioDevice.getDevice().getAnonymizedAddress() + + " enable LE broadcast assistant profile"); + broadcastAssistant.setEnabled(leAudioDevice.getDevice(), true); + } } }