am ff5e5db3: Fix BT crash due to unset value for BluetoothGattDescriptor from API user
* commit 'ff5e5db319785d23d672af95ac2dff3f37827cfd': Fix BT crash due to unset value for BluetoothGattDescriptor from API user
This commit is contained in:
committed by
Android Git Automerger
commit
e21aafab0d
@@ -928,7 +928,7 @@ public final class BluetoothGatt implements BluetoothProfile {
|
|||||||
BluetoothGattCharacteristic.PROPERTY_WRITE_NO_RESPONSE) == 0) return false;
|
BluetoothGattCharacteristic.PROPERTY_WRITE_NO_RESPONSE) == 0) return false;
|
||||||
|
|
||||||
if (VDBG) Log.d(TAG, "writeCharacteristic() - uuid: " + characteristic.getUuid());
|
if (VDBG) Log.d(TAG, "writeCharacteristic() - uuid: " + characteristic.getUuid());
|
||||||
if (mService == null || mClientIf == 0) return false;
|
if (mService == null || mClientIf == 0 || characteristic.getValue() == null) return false;
|
||||||
|
|
||||||
BluetoothGattService service = characteristic.getService();
|
BluetoothGattService service = characteristic.getService();
|
||||||
if (service == null) return false;
|
if (service == null) return false;
|
||||||
@@ -1015,7 +1015,7 @@ public final class BluetoothGatt implements BluetoothProfile {
|
|||||||
*/
|
*/
|
||||||
public boolean writeDescriptor(BluetoothGattDescriptor descriptor) {
|
public boolean writeDescriptor(BluetoothGattDescriptor descriptor) {
|
||||||
if (VDBG) Log.d(TAG, "writeDescriptor() - uuid: " + descriptor.getUuid());
|
if (VDBG) Log.d(TAG, "writeDescriptor() - uuid: " + descriptor.getUuid());
|
||||||
if (mService == null || mClientIf == 0) return false;
|
if (mService == null || mClientIf == 0 || descriptor.getValue() == null) return false;
|
||||||
|
|
||||||
BluetoothGattCharacteristic characteristic = descriptor.getCharacteristic();
|
BluetoothGattCharacteristic characteristic = descriptor.getCharacteristic();
|
||||||
if (characteristic == null) return false;
|
if (characteristic == null) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user