diff --git a/core/api/current.txt b/core/api/current.txt index 99226159348b1..ccbee6961367c 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -9111,10 +9111,10 @@ package android.bluetooth { 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 executeReliableWrite(); - method public java.util.List getConnectedDevices(); - method public int getConnectionState(android.bluetooth.BluetoothDevice); + method @Deprecated public java.util.List getConnectedDevices(); + method @Deprecated public int getConnectionState(android.bluetooth.BluetoothDevice); method public android.bluetooth.BluetoothDevice getDevice(); - method public java.util.List getDevicesMatchingConnectionStates(int[]); + method @Deprecated public java.util.List getDevicesMatchingConnectionStates(int[]); method public android.bluetooth.BluetoothGattService getService(java.util.UUID); method public java.util.List getServices(); method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic); diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java index 4e7c01ad2db15..fe8d1ba80e339 100644 --- a/core/java/android/bluetooth/BluetoothGatt.java +++ b/core/java/android/bluetooth/BluetoothGatt.java @@ -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 - * * @throws UnsupportedOperationException */ @Override @RequiresNoPermission + @Deprecated public int getConnectionState(BluetoothDevice device) { 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 * * @throws UnsupportedOperationException */ @Override @RequiresNoPermission + @Deprecated public List getConnectedDevices() { throw new UnsupportedOperationException( "Use BluetoothManager#getConnectedDevices instead."); } /** - * Not supported - please use + * @deprecated Not supported - please use * {@link BluetoothManager#getDevicesMatchingConnectionStates(int, int[])} * with {@link BluetoothProfile#GATT} as first argument * @@ -1839,6 +1840,7 @@ public final class BluetoothGatt implements BluetoothProfile { */ @Override @RequiresNoPermission + @Deprecated public List getDevicesMatchingConnectionStates(int[] states) { throw new UnsupportedOperationException( "Use BluetoothManager#getDevicesMatchingConnectionStates instead.");