From cd45effe0a6cd0702f39ff6e9de17c662af92e99 Mon Sep 17 00:00:00 2001 From: Kieran Davis Date: Mon, 25 Nov 2024 10:52:04 -0800 Subject: [PATCH] android:fix: Sets bluetoothManager state to AppRTCBluetoothManager.State.HEADSET_UNAVAILABLE if user disconnects their headset and there is no new device returned from getScoDevice() --- .../com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java b/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java index 959abbc..0d897fe 100644 --- a/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java +++ b/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java @@ -145,6 +145,7 @@ private void updateDeviceList() { boolean needChange = false; if (bluetoothAudioDevice != null && newBtDevice == null) { needChange = true; + bluetoothState = State.HEADSET_UNAVAILABLE; } else if (bluetoothAudioDevice == null && newBtDevice != null) { needChange = true; } else if (bluetoothAudioDevice != null && bluetoothAudioDevice.getId() != newBtDevice.getId()) {