Package org.robolectric.shadows
Class ShadowBluetoothPan
java.lang.Object
org.robolectric.shadows.ShadowBluetoothPan
@Implements(value=android.bluetooth.BluetoothPan.class,
isInAndroidSdk=false)
public class ShadowBluetoothPan
extends Object
Shadow for
BluetoothPan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDevice
(BluetoothDevice bluetoothDevice, int connectionState) Adds the given bluetoothDevice with connectionState to the list of devices returned bygetConnectedDevices()
andgetDevicesMatchingConnectionStates(int[])
protected List<BluetoothDevice>
Returns a list of devices that are currently connected.protected List<BluetoothDevice>
getDevicesMatchingConnectionStates
(int[] states) Returns a list of devices that match the given connection states.void
removeDevice
(BluetoothDevice bluetoothDevice) Removes the given bluetoothDevice from the list of devices returned bygetConnectedDevices()
andgetDevicesMatchingConnectionStates(int[])
-
Constructor Details
-
ShadowBluetoothPan
public ShadowBluetoothPan()
-
-
Method Details
-
addDevice
Adds the given bluetoothDevice with connectionState to the list of devices returned bygetConnectedDevices()
andgetDevicesMatchingConnectionStates(int[])
- Parameters:
bluetoothDevice
- the device to addconnectionState
- the connection state of the deviceThe connection state must be one of the following:
-
removeDevice
Removes the given bluetoothDevice from the list of devices returned bygetConnectedDevices()
andgetDevicesMatchingConnectionStates(int[])
- Parameters:
bluetoothDevice
- the device to remove
-
getConnectedDevices
Returns a list of devices that are currently connected.- Returns:
- a list of devices that are currently connected
-
getDevicesMatchingConnectionStates
Returns a list of devices that match the given connection states.- Parameters:
states
- the connection states to match- Returns:
- a list of devices that match the given connection states
-