diff options
author | Ćukasz Rymanowski <rlukasz@google.com> | 2022-06-24 22:08:12 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-29 00:03:55 +0000 |
commit | 67952a5b0ce534f602e13570c5e923b4f03abaf2 (patch) | |
tree | 062bd308bbb0fb7200f2f5d7b2b569099a5bf475 /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | 5467b904812bfe30651334826a0bdbfd1b868c1d (diff) |
gatt: Fix incorrect write to the descriptor.
This patch fixes regression after
https://android-review.googlesource.com/q/topic:gatt-racecondition-fix
In case of GATT Write error to descriptor or characteristic,
the value which was tried to be written is zeroed in the
onWriteDescriptor/Characteristic callback.
This cause an issue in following use case:
1) Application writes descriptor on unencrypted link to characteristic
which requires authentication
2) Remote device response with an error insufficient authenthication
3) Android repeats write descriptor with new authenthication
requrements with the descriptor value taken from the onWriteDescriptor
callbac - the one which was zeroed. This result in try to write
invalid value to the descriptor
This patch make sure that value in the callback is always the one which
was tried to write, no matter of status.
Bug: 235756799
Test: atest BluetoothInstrumentationTests
Tag: #stability
Merged-In: Icd18b95a3c44c082117d035cdf25961938de829d
Change-Id: Icd18b95a3c44c082117d035cdf25961938de829d
(cherry picked from commit 24f45364768c19bdb0222ce836fce7531d5182de)
(cherry picked from commit b64432cfb2505f57337061c2047a485a34f9622f)
Merged-In: Icd18b95a3c44c082117d035cdf25961938de829d
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
0 files changed, 0 insertions, 0 deletions