Closed cristian-ich closed 3 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
Fixes #
description
Reduce the number of handler.post calls to only one per operation.
changes
We are calling too often handler.post. This proved to be a problem before when was used in onCharacteristicChanged. Also FitbitGatt.getInstance() calls should be reduced. The instance is volatile and every time it is called it has to be read from memory bypassing any cache mechanism from os.
how tested
unit tests plus loki test