Loading src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +9 −1 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ public class BluetoothDeviceManager { private boolean mLeAudioCallbackRegistered = false; private BluetoothLeAudio mBluetoothLeAudioService; private boolean mLeAudioSetAsCommunicationDevice = false; private String mLeAudioDevice; private boolean mHearingAidSetAsCommunicationDevice = false; private BluetoothDevice mBluetoothHearingAidActiveDeviceCache; private BluetoothAdapter mBluetoothAdapter; Loading Loading @@ -417,10 +418,17 @@ public class BluetoothDeviceManager { } public void clearLeAudioCommunicationDevice() { Log.i(this, "clearLeAudioCommunicationDevice: mLeAudioSetAsCommunicationDevice = " + mLeAudioSetAsCommunicationDevice + " device = " + mLeAudioDevice); if (!mLeAudioSetAsCommunicationDevice) { return; } mLeAudioSetAsCommunicationDevice = false; if (mLeAudioDevice != null) { mBluetoothRouteManager.onAudioLost(mLeAudioDevice); mLeAudioDevice = null; } if (mAudioManager == null) { Log.i(this, "clearLeAudioCommunicationDevice: mAudioManager is null"); return; Loading @@ -428,7 +436,6 @@ public class BluetoothDeviceManager { if (mAudioManager.getCommunicationDevice() != null && mAudioManager.getCommunicationDevice().getType() == AudioDeviceInfo.TYPE_BLE_HEADSET) { mBluetoothRouteManager.onAudioLost(mAudioManager.getCommunicationDevice().getAddress()); mAudioManager.clearCommunicationDevice(); } } Loading Loading @@ -493,6 +500,7 @@ public class BluetoothDeviceManager { Log.i(this, " bleHeadset device set"); mBluetoothRouteManager.onAudioOn(bleHeadset.getAddress()); mLeAudioSetAsCommunicationDevice = true; mLeAudioDevice = bleHeadset.getAddress(); } return result; } Loading Loading
src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +9 −1 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ public class BluetoothDeviceManager { private boolean mLeAudioCallbackRegistered = false; private BluetoothLeAudio mBluetoothLeAudioService; private boolean mLeAudioSetAsCommunicationDevice = false; private String mLeAudioDevice; private boolean mHearingAidSetAsCommunicationDevice = false; private BluetoothDevice mBluetoothHearingAidActiveDeviceCache; private BluetoothAdapter mBluetoothAdapter; Loading Loading @@ -417,10 +418,17 @@ public class BluetoothDeviceManager { } public void clearLeAudioCommunicationDevice() { Log.i(this, "clearLeAudioCommunicationDevice: mLeAudioSetAsCommunicationDevice = " + mLeAudioSetAsCommunicationDevice + " device = " + mLeAudioDevice); if (!mLeAudioSetAsCommunicationDevice) { return; } mLeAudioSetAsCommunicationDevice = false; if (mLeAudioDevice != null) { mBluetoothRouteManager.onAudioLost(mLeAudioDevice); mLeAudioDevice = null; } if (mAudioManager == null) { Log.i(this, "clearLeAudioCommunicationDevice: mAudioManager is null"); return; Loading @@ -428,7 +436,6 @@ public class BluetoothDeviceManager { if (mAudioManager.getCommunicationDevice() != null && mAudioManager.getCommunicationDevice().getType() == AudioDeviceInfo.TYPE_BLE_HEADSET) { mBluetoothRouteManager.onAudioLost(mAudioManager.getCommunicationDevice().getAddress()); mAudioManager.clearCommunicationDevice(); } } Loading Loading @@ -493,6 +500,7 @@ public class BluetoothDeviceManager { Log.i(this, " bleHeadset device set"); mBluetoothRouteManager.onAudioOn(bleHeadset.getAddress()); mLeAudioSetAsCommunicationDevice = true; mLeAudioDevice = bleHeadset.getAddress(); } return result; } Loading