Loading src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -296,7 +296,7 @@ public class BluetoothRouteManager extends StateMachine { } break; case BT_AUDIO_LOST: if (Objects.equals(mDeviceAddress, address)) { if (Objects.equals(mDeviceAddress, address) || address == null) { Log.i(LOG_TAG, "Connection with device %s failed.", mDeviceAddress); transitionToActualState(); Loading Loading @@ -406,7 +406,7 @@ public class BluetoothRouteManager extends StateMachine { } break; case BT_AUDIO_LOST: if (Objects.equals(mDeviceAddress, address)) { if (Objects.equals(mDeviceAddress, address) || address == null) { Log.i(LOG_TAG, "HFP connection with device %s lost.", mDeviceAddress); transitionToActualState(); } else { Loading tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java +12 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,18 @@ public class BluetoothRouteTransitionTests extends TelecomTestCase { .setExpectedFinalStateName(BluetoothRouteManager.AUDIO_OFF_STATE_NAME) .build()); result.add(new BluetoothRouteTestParametersBuilder() .setName("Audio disconnect comes with a null device") .setInitialBluetoothState(BluetoothRouteManager.AUDIO_CONNECTED_STATE_NAME_PREFIX) .setInitialDevice(DEVICE2) .setConnectedDevices(DEVICE2) .setMessageType(BluetoothRouteManager.BT_AUDIO_LOST) .setMessageDevice(null) .setExpectedListenerUpdates(ListenerUpdate.AUDIO_DISCONNECTED) .setExpectedBluetoothInteraction(NONE) .setExpectedFinalStateName(BluetoothRouteManager.AUDIO_OFF_STATE_NAME) .build()); result.add(new BluetoothRouteTestParametersBuilder() .setName("Device gets disconnected while pending. No fallback.") .setInitialBluetoothState(BluetoothRouteManager.AUDIO_CONNECTING_STATE_NAME_PREFIX) Loading Loading
src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -296,7 +296,7 @@ public class BluetoothRouteManager extends StateMachine { } break; case BT_AUDIO_LOST: if (Objects.equals(mDeviceAddress, address)) { if (Objects.equals(mDeviceAddress, address) || address == null) { Log.i(LOG_TAG, "Connection with device %s failed.", mDeviceAddress); transitionToActualState(); Loading Loading @@ -406,7 +406,7 @@ public class BluetoothRouteManager extends StateMachine { } break; case BT_AUDIO_LOST: if (Objects.equals(mDeviceAddress, address)) { if (Objects.equals(mDeviceAddress, address) || address == null) { Log.i(LOG_TAG, "HFP connection with device %s lost.", mDeviceAddress); transitionToActualState(); } else { Loading
tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java +12 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,18 @@ public class BluetoothRouteTransitionTests extends TelecomTestCase { .setExpectedFinalStateName(BluetoothRouteManager.AUDIO_OFF_STATE_NAME) .build()); result.add(new BluetoothRouteTestParametersBuilder() .setName("Audio disconnect comes with a null device") .setInitialBluetoothState(BluetoothRouteManager.AUDIO_CONNECTED_STATE_NAME_PREFIX) .setInitialDevice(DEVICE2) .setConnectedDevices(DEVICE2) .setMessageType(BluetoothRouteManager.BT_AUDIO_LOST) .setMessageDevice(null) .setExpectedListenerUpdates(ListenerUpdate.AUDIO_DISCONNECTED) .setExpectedBluetoothInteraction(NONE) .setExpectedFinalStateName(BluetoothRouteManager.AUDIO_OFF_STATE_NAME) .build()); result.add(new BluetoothRouteTestParametersBuilder() .setName("Device gets disconnected while pending. No fallback.") .setInitialBluetoothState(BluetoothRouteManager.AUDIO_CONNECTING_STATE_NAME_PREFIX) Loading