Fitbit / bitgatt

The FitbitGatt API is designed to provide a strong state machine around all Android gatt operations with the aim of making Android BLE development across Android vendors as straightforward and side-effect free as possible.
Mozilla Public License 2.0
57 stars 17 forks source link

Fix for bond denial failure #38

Closed ShawnW858 closed 3 years ago

ShawnW858 commented 3 years ago

Fixes # Moving to bond state NONE should result in completion by failure

description

When a bond transaction changes state to NONE, the caller does not get notified of any errors/failures.

changes

how tested

Unit tests:

Created a unit test to confirm that the caller gets notified that the CreateBondTransaction successfully completes when state changes to BOND_BONDED and BOND_NONE (failure). Created a unit test to confirm that the caller does not get notified when the state changes to BOND_BONDING. Created unit test to confirm that the caller does not get notified of errors if the newState and oldState have the same value.