Merge "BluetoothGatt: Deprecate unsupported methods"
This commit is contained in:
@@ -9178,10 +9178,10 @@ package android.bluetooth {
|
|||||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void disconnect();
|
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public void disconnect();
|
||||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean discoverServices();
|
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean discoverServices();
|
||||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean executeReliableWrite();
|
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean executeReliableWrite();
|
||||||
method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
|
method @Deprecated public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
|
||||||
method public int getConnectionState(android.bluetooth.BluetoothDevice);
|
method @Deprecated public int getConnectionState(android.bluetooth.BluetoothDevice);
|
||||||
method public android.bluetooth.BluetoothDevice getDevice();
|
method public android.bluetooth.BluetoothDevice getDevice();
|
||||||
method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
|
method @Deprecated public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
|
||||||
method public android.bluetooth.BluetoothGattService getService(java.util.UUID);
|
method public android.bluetooth.BluetoothGattService getService(java.util.UUID);
|
||||||
method public java.util.List<android.bluetooth.BluetoothGattService> getServices();
|
method public java.util.List<android.bluetooth.BluetoothGattService> getServices();
|
||||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
|
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
|
||||||
|
|||||||
@@ -1806,32 +1806,33 @@ public final class BluetoothGatt implements BluetoothProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
|
* @deprecated Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
|
||||||
* with {@link BluetoothProfile#GATT} as argument
|
* with {@link BluetoothProfile#GATT} as argument
|
||||||
*
|
|
||||||
* @throws UnsupportedOperationException
|
* @throws UnsupportedOperationException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@RequiresNoPermission
|
@RequiresNoPermission
|
||||||
|
@Deprecated
|
||||||
public int getConnectionState(BluetoothDevice device) {
|
public int getConnectionState(BluetoothDevice device) {
|
||||||
throw new UnsupportedOperationException("Use BluetoothManager#getConnectionState instead.");
|
throw new UnsupportedOperationException("Use BluetoothManager#getConnectionState instead.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
|
* @deprecated Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
|
||||||
* with {@link BluetoothProfile#GATT} as argument
|
* with {@link BluetoothProfile#GATT} as argument
|
||||||
*
|
*
|
||||||
* @throws UnsupportedOperationException
|
* @throws UnsupportedOperationException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@RequiresNoPermission
|
@RequiresNoPermission
|
||||||
|
@Deprecated
|
||||||
public List<BluetoothDevice> getConnectedDevices() {
|
public List<BluetoothDevice> getConnectedDevices() {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"Use BluetoothManager#getConnectedDevices instead.");
|
"Use BluetoothManager#getConnectedDevices instead.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not supported - please use
|
* @deprecated Not supported - please use
|
||||||
* {@link BluetoothManager#getDevicesMatchingConnectionStates(int, int[])}
|
* {@link BluetoothManager#getDevicesMatchingConnectionStates(int, int[])}
|
||||||
* with {@link BluetoothProfile#GATT} as first argument
|
* with {@link BluetoothProfile#GATT} as first argument
|
||||||
*
|
*
|
||||||
@@ -1839,6 +1840,7 @@ public final class BluetoothGatt implements BluetoothProfile {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@RequiresNoPermission
|
@RequiresNoPermission
|
||||||
|
@Deprecated
|
||||||
public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
|
public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"Use BluetoothManager#getDevicesMatchingConnectionStates instead.");
|
"Use BluetoothManager#getDevicesMatchingConnectionStates instead.");
|
||||||
|
|||||||
Reference in New Issue
Block a user