@Implements(value=android.bluetooth.BluetoothDevice.class) public class ShadowBluetoothDevice extends java.lang.Object
| Constructor and Description |
|---|
ShadowBluetoothDevice() |
| Modifier and Type | Method and Description |
|---|---|
protected android.bluetooth.BluetoothGatt |
connectGatt(android.content.Context context,
boolean autoConnect,
android.bluetooth.BluetoothGattCallback callback) |
protected boolean |
createBond()
Returns whether this device has been bonded with.
|
protected boolean |
fetchUuidsWithSdp()
Overrides behavior of
BluetoothDevice.fetchUuidsWithSdp(). |
protected int |
getBondState()
Overrides behavior of
BluetoothDevice.getBondState() to return pre-set result. |
int |
getFetchUuidsWithSdpCount()
Returns the number of times fetchUuidsWithSdp has been called.
|
protected java.lang.String |
getName() |
protected static android.bluetooth.IBluetooth |
getService()
Implements getService() in the same way the original method does, but ignores any Exceptions from invoking
BluetoothAdapter.getBluetoothService(android.bluetooth.IBluetoothManagerCallback). |
protected android.os.ParcelUuid[] |
getUuids()
Overrides behavior of
BluetoothDevice.getUuids() to return pre-set result. |
static android.bluetooth.BluetoothDevice |
newInstance(java.lang.String address) |
void |
setBondState(int bondState)
Sets value of bond state for
BluetoothDevice.getBondState(). |
void |
setCreatedBond(boolean createdBond)
Sets whether this device has been bonded with.
|
void |
setFetchUuidsWithSdpResult(boolean fetchUuidsWithSdpResult)
Sets value of the return result for
BluetoothDevice.fetchUuidsWithSdp(). |
void |
setName(java.lang.String name) |
void |
setUuids(android.os.ParcelUuid[] uuids)
Sets the return value for
BluetoothDevice.getUuids(). |
public static android.bluetooth.BluetoothDevice newInstance(java.lang.String address)
@Implementation protected static android.bluetooth.IBluetooth getService()
Implements getService() in the same way the original method does, but ignores any Exceptions from invoking BluetoothAdapter.getBluetoothService(android.bluetooth.IBluetoothManagerCallback).
public void setName(java.lang.String name)
@Implementation protected java.lang.String getName()
public void setUuids(android.os.ParcelUuid[] uuids)
Sets the return value for BluetoothDevice.getUuids().
@Implementation protected android.os.ParcelUuid[] getUuids()
Overrides behavior of BluetoothDevice.getUuids() to return pre-set result.
public void setBondState(int bondState)
Sets value of bond state for BluetoothDevice.getBondState().
@Implementation protected int getBondState()
Overrides behavior of BluetoothDevice.getBondState() to return pre-set result.
public void setCreatedBond(boolean createdBond)
Sets whether this device has been bonded with.
@Implementation protected boolean createBond()
Returns whether this device has been bonded with.
public void setFetchUuidsWithSdpResult(boolean fetchUuidsWithSdpResult)
Sets value of the return result for BluetoothDevice.fetchUuidsWithSdp().
@Implementation protected boolean fetchUuidsWithSdp()
Overrides behavior of BluetoothDevice.fetchUuidsWithSdp(). This method updates the counter which counts the number of invocations of this method.
public int getFetchUuidsWithSdpCount()
Returns the number of times fetchUuidsWithSdp has been called.
@Implementation(minSdk=18) protected android.bluetooth.BluetoothGatt connectGatt(android.content.Context context, boolean autoConnect, android.bluetooth.BluetoothGattCallback callback)