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 Details

    • ShadowBluetoothPan

      public ShadowBluetoothPan()
  • Method Details

    • addDevice

      public void addDevice(BluetoothDevice bluetoothDevice, int connectionState)
      Adds the given bluetoothDevice with connectionState to the list of devices returned by getConnectedDevices() and getDevicesMatchingConnectionStates(int[])
      Parameters:
      bluetoothDevice - the device to add
      connectionState - the connection state of the device

      The connection state must be one of the following:

    • removeDevice

      public void removeDevice(BluetoothDevice bluetoothDevice)
      Removes the given bluetoothDevice from the list of devices returned by getConnectedDevices() and getDevicesMatchingConnectionStates(int[])
      Parameters:
      bluetoothDevice - the device to remove
    • setBluetoothTetheringOn

      public void setBluetoothTetheringOn(boolean value)
      Sets the value of bluetoothTetheringOn
      Parameters:
      value - the value to set
    • getConnectedDevices

      @Implementation protected List<BluetoothDevice> getConnectedDevices()
      Returns a list of devices that are currently connected.
      Returns:
      a list of devices that are currently connected
    • getDevicesMatchingConnectionStates

      @Implementation protected List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states)
      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
    • isTetheringOn

      @Implementation protected boolean isTetheringOn()
      Returns the value of bluetoothTetheringOn
      Returns:
      the value of bluetoothTetheringOn