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 24f45364)
Loading
Please register or sign in to comment