Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bf860e6f authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

BluetoothLeAudio: Return early from getLeAudioConnectedDevices

If LeAudio is not supported or there is no known groups, function can
return early.

It also fixes flake testLeAudioServiceDisconnect() test:

java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothDevice android.bluetooth.BluetoothLeAudio.getConnectedGroupLeadDevice(int)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothDevice android.bluetooth.BluetoothLeAudio.getConnectedGroupLeadDevice(int)' on a null object reference
	at com.android.server.telecom.bluetooth.BluetoothDeviceManager.getLeAudioConnectedDevices(BluetoothDeviceManager.java:219)
	at com.android.server.telecom.bluetooth.BluetoothDeviceManager.getNumConnectedDevices(BluetoothDeviceManager.java:232)
	at com.android.server.telecom.tests.BluetoothDeviceManagerTest.testLeAudioServiceDisconnect(BluetoothDeviceManagerTest.java:299)

Bug: 150670922
Test: atest TelecomUnitTest
Change-Id: Ic27732771a7e87d5b5a87584f50996cf3fd97b48
parent e97e5593
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment