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
Loading
Please register or sign in to comment