Loading src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -795,7 +795,8 @@ public class BluetoothRouteManager extends StateMachine { if (bluetoothLeAudio != null) { if (mDeviceManager.isLeAudioCommunicationDevice()) { for (BluetoothDevice device : bluetoothLeAudio.getActiveDevices()) { for (BluetoothDevice device : bluetoothAdapter.getActiveDevices( BluetoothProfile.LE_AUDIO)) { if (device != null) { leAudioActiveDevice = device; activeDevices++; Loading tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,8 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase { verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class), eq(BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL)); when(mBluetoothLeAudio.getActiveDevices()).thenReturn(Arrays.asList(device5, device6)); when(mAdapter.getActiveDevices(eq(BluetoothProfile.LE_AUDIO))) .thenReturn(Arrays.asList(device5, device6)); receiverUnderTest.onReceive(mContext, buildConnectionActionIntent(BluetoothHeadset.STATE_DISCONNECTED, device5, Loading tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ public class BluetoothRouteManagerTest extends TelecomTestCase { .thenReturn(Arrays.asList(hearingAidDevices)); when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.HEARING_AID))) .thenReturn(Arrays.asList(hearingAidActiveDevice, null)); when(mBluetoothLeAudio.getActiveDevices()) when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.LE_AUDIO))) .thenReturn(Arrays.asList(leAudioDevice, null)); } Loading tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ public class BluetoothRouteTransitionTests extends TelecomTestCase { if (mParams.hearingAidBtDevices.contains(mParams.messageDevice)) { when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.HEARING_AID))) .thenReturn(Arrays.asList(null, null)); when(mBluetoothLeAudio.getActiveDevices()) when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.LE_AUDIO))) .thenReturn(mParams.leAudioDevices.stream() .filter(device -> device != mParams.messageDevice) .collect(Collectors.toList())); Loading Loading
src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -795,7 +795,8 @@ public class BluetoothRouteManager extends StateMachine { if (bluetoothLeAudio != null) { if (mDeviceManager.isLeAudioCommunicationDevice()) { for (BluetoothDevice device : bluetoothLeAudio.getActiveDevices()) { for (BluetoothDevice device : bluetoothAdapter.getActiveDevices( BluetoothProfile.LE_AUDIO)) { if (device != null) { leAudioActiveDevice = device; activeDevices++; Loading
tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,8 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase { verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class), eq(BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL)); when(mBluetoothLeAudio.getActiveDevices()).thenReturn(Arrays.asList(device5, device6)); when(mAdapter.getActiveDevices(eq(BluetoothProfile.LE_AUDIO))) .thenReturn(Arrays.asList(device5, device6)); receiverUnderTest.onReceive(mContext, buildConnectionActionIntent(BluetoothHeadset.STATE_DISCONNECTED, device5, Loading
tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ public class BluetoothRouteManagerTest extends TelecomTestCase { .thenReturn(Arrays.asList(hearingAidDevices)); when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.HEARING_AID))) .thenReturn(Arrays.asList(hearingAidActiveDevice, null)); when(mBluetoothLeAudio.getActiveDevices()) when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.LE_AUDIO))) .thenReturn(Arrays.asList(leAudioDevice, null)); } Loading
tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ public class BluetoothRouteTransitionTests extends TelecomTestCase { if (mParams.hearingAidBtDevices.contains(mParams.messageDevice)) { when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.HEARING_AID))) .thenReturn(Arrays.asList(null, null)); when(mBluetoothLeAudio.getActiveDevices()) when(mBluetoothAdapter.getActiveDevices(eq(BluetoothProfile.LE_AUDIO))) .thenReturn(mParams.leAudioDevices.stream() .filter(device -> device != mParams.messageDevice) .collect(Collectors.toList())); Loading