Merge "Always use Write Request for GATT descriptor writes"

This commit is contained in:
Andre Eisenbach
2016-04-01 00:18:47 +00:00
committed by Gerrit Code Review

View File

@@ -422,7 +422,7 @@ public final class BluetoothGatt implements BluetoothProfile {
try { try {
mAuthRetry = true; mAuthRetry = true;
mService.writeDescriptor(mClientIf, address, handle, mService.writeDescriptor(mClientIf, address, handle,
descriptor.getCharacteristic().getWriteType(), BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT,
AUTHENTICATION_MITM, descriptor.getValue()); AUTHENTICATION_MITM, descriptor.getValue());
return; return;
} catch (RemoteException e) { } catch (RemoteException e) {
@@ -943,7 +943,8 @@ public final class BluetoothGatt implements BluetoothProfile {
try { try {
mService.writeDescriptor(mClientIf, device.getAddress(), descriptor.getInstanceId(), mService.writeDescriptor(mClientIf, device.getAddress(), descriptor.getInstanceId(),
characteristic.getWriteType(), AUTHENTICATION_NONE, descriptor.getValue()); BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT, AUTHENTICATION_NONE,
descriptor.getValue());
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(TAG,"",e); Log.e(TAG,"",e);
mDeviceBusy = false; mDeviceBusy = false;