Package org.robolectric.shadows
Class ShadowBluetoothManager
- java.lang.Object
-
- org.robolectric.shadows.ShadowBluetoothManager
-
@Implements(value=android.bluetooth.BluetoothManager.class, minSdk=18) public class ShadowBluetoothManager extends Object
Shadow ofBluetoothManager
that makes the testing possible.
-
-
Constructor Summary
Constructors Constructor Description ShadowBluetoothManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDevice(int profile, int state, BluetoothDevice device)
Add a remote bluetooth device that will be served byBluetoothManager.getDevicesMatchingConnectionStates(int, int[])
for the specified profile and states of the profile connection.protected BluetoothAdapter
getAdapter()
protected List<BluetoothDevice>
getDevicesMatchingConnectionStates(int profile, int[] states)
-
-
-
Method Detail
-
getAdapter
@Implementation protected BluetoothAdapter getAdapter()
-
getDevicesMatchingConnectionStates
@Implementation protected List<BluetoothDevice> getDevicesMatchingConnectionStates(int profile, int[] states)
-
addDevice
public void addDevice(int profile, int state, BluetoothDevice device)
Add a remote bluetooth device that will be served byBluetoothManager.getDevicesMatchingConnectionStates(int, int[])
for the specified profile and states of the profile connection.- Parameters:
profile
-BluetoothProfile.GATT
orBluetoothProfile.GATT_SERVER
.state
- State of the profile connection. One ofBluetoothProfile.STATE_CONNECTED
,BluetoothProfile.STATE_CONNECTING
,BluetoothProfile.STATE_DISCONNECTED
andBluetoothProfile.STATE_DISCONNECTING
.device
- The remote bluetooth device.
-
-