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

Remove enum ambiguity from TransactionResult.responseStatus() #36

Open droolingsheep opened 4 years ago

droolingsheep commented 4 years ago

Fixes

description

TransactionResult.responseStatus was used to hold ordinals from both GattStatus and GattDisconnectReason enums, which created ambiguity about its meaning. Also, sometimes the "code" was passed in instead of the ordinal, creating an incorrect mapping.

Furthermore, there are 2 GattDisconnectReason enums, one of which appears to be a superset of the other.

changes

how tested

No changes to bluetooth behavior, so I didn't test it.

droolingsheep commented 4 years ago

Please double-check that I picked the correct enum (GattStatus vs GattDisconnectReason) for each callback's status argument.