summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothGattDescriptor.java
diff options
context:
space:
mode:
authorRahul Sabnis <rahulsabnis@google.com>2021-10-13 10:56:50 -0700
committerRahul Sabnis <rahulsabnis@google.com>2021-11-04 17:26:10 -0700
commita101e2eb79aafadc2421a32af933c41f4959e6e7 (patch)
tree6b332a11595e768400222f9035f8f04c7369db45 /framework/java/android/bluetooth/BluetoothGattDescriptor.java
parent04d2f68fa6d99438cc85b0c5bf1d59915c206ca7 (diff)
Deprecate GATT callbacks and methods that were not memory safe and
replace with memory safe versions. Tag: #feature Bug: 195157393 Test: Manual CTS-Coverage-Bug: 205190062 Change-Id: I5ae604ec20febcf646bfe6a8f866b218448349c1
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothGattDescriptor.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothGattDescriptor.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothGattDescriptor.java b/framework/java/android/bluetooth/BluetoothGattDescriptor.java
index ed5ea08730..a35d5b99fd 100644
--- a/framework/java/android/bluetooth/BluetoothGattDescriptor.java
+++ b/framework/java/android/bluetooth/BluetoothGattDescriptor.java
@@ -260,7 +260,10 @@ public class BluetoothGattDescriptor implements Parcelable {
* operation.
*
* @return Cached value of the descriptor
+ *
+ * @deprecated Use {@link BluetoothGatt#readDescriptor(BluetoothGattDescriptor)} instead
*/
+ @Deprecated
public byte[] getValue() {
return mValue;
}
@@ -276,7 +279,11 @@ public class BluetoothGattDescriptor implements Parcelable {
* @param value New value for this descriptor
* @return true if the locally stored value has been set, false if the requested value could not
* be stored locally.
+ *
+ * @deprecated Pass the descriptor value directly into
+ * {@link BluetoothGatt#writeDescriptor(BluetoothGattDescriptor, byte[])}
*/
+ @Deprecated
public boolean setValue(byte[] value) {
mValue = value;
return true;