Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java +17 −5 Original line number Diff line number Diff line Loading @@ -126,15 +126,27 @@ public class LeAudioProfile implements LocalBluetoothProfile { } public List<BluetoothDevice> getConnectedDevices() { if (mService == null) { return new ArrayList<BluetoothDevice>(0); return getDevicesByStates(new int[] { BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_CONNECTING, BluetoothProfile.STATE_DISCONNECTING}); } return mService.getDevicesMatchingConnectionStates( new int[] {BluetoothProfile.STATE_CONNECTED, public List<BluetoothDevice> getConnectableDevices() { return getDevicesByStates(new int[] { BluetoothProfile.STATE_DISCONNECTED, BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_CONNECTING, BluetoothProfile.STATE_DISCONNECTING}); } private List<BluetoothDevice> getDevicesByStates(int[] states) { if (mService == null) { return new ArrayList<>(0); } return mService.getDevicesMatchingConnectionStates(states); } /* * @hide */ Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java +17 −5 Original line number Diff line number Diff line Loading @@ -126,15 +126,27 @@ public class LeAudioProfile implements LocalBluetoothProfile { } public List<BluetoothDevice> getConnectedDevices() { if (mService == null) { return new ArrayList<BluetoothDevice>(0); return getDevicesByStates(new int[] { BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_CONNECTING, BluetoothProfile.STATE_DISCONNECTING}); } return mService.getDevicesMatchingConnectionStates( new int[] {BluetoothProfile.STATE_CONNECTED, public List<BluetoothDevice> getConnectableDevices() { return getDevicesByStates(new int[] { BluetoothProfile.STATE_DISCONNECTED, BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_CONNECTING, BluetoothProfile.STATE_DISCONNECTING}); } private List<BluetoothDevice> getDevicesByStates(int[] states) { if (mService == null) { return new ArrayList<>(0); } return mService.getDevicesMatchingConnectionStates(states); } /* * @hide */ Loading