Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle
cpfeiffer 50295864f5 Use a custom IntentListener callback instead of LocalBroadcastManager for ble profiles
The issue here is the following:

- we used intents in the generic BleProfile classes to notify about the results of e.g. certain read requests
- we used to send these results asynchronously via LocalBroadcastManager.sendBroadcast(), which always used the main thread for sending
- however, we noticed that reconnecting to devices sometimes failed because the results arrived too late and the next action in the BLE queue lacked the necessary information
- the fix was to use LocalBroadcastManager.setBroadcastSync(), so that the results arrive in time
- this unfortunately meant that they were not sent in the main thread anymore, and especially, this would send all pending intents that were previously queued via sendBroadcast() also in the "wrong" thread (in order to keep the order of events)

The fix is to use a custom IntentListener callback interface for synchronous notifications of ble profile results
*without* also causing other, previously queued intents to be sent.

Fixes #1218
2018-08-18 00:39:14 +02:00
..
actions Update license headers 2018-02-26 14:27:33 +01:00
profiles Use a custom IntentListener callback instead of LocalBroadcastManager for ble profiles 2018-08-18 00:39:14 +02:00
AbstractBTLEDeviceSupport.java Update license headers 2018-02-26 14:27:33 +01:00
AbstractBTLEOperation.java Merge branch 'master' into bip-wip 2018-03-13 17:27:18 +01:00
AbstractGattCallback.java Update license headers 2018-02-26 14:27:33 +01:00
BleNamesResolver.java Update license headers 2018-02-26 14:27:33 +01:00
BLETypeConversions.java Merge branch 'master' into bip-wip 2018-03-13 17:27:18 +01:00
BtLEAction.java Update license headers 2018-02-26 14:27:33 +01:00
BTLEOperation.java Merge branch 'master' into bip-wip 2018-03-13 17:27:18 +01:00
BtLEQueue.java Merge branch 'master' into bip-wip 2018-03-13 17:27:18 +01:00
GattCallback.java Update license headers 2017-09-12 12:39:15 +02:00
GattCharacteristic.java Update license headers 2018-02-26 14:27:33 +01:00
GattDescriptor.java Update license headers 2018-02-26 14:27:33 +01:00
GattService.java Update license headers 2018-02-26 14:27:33 +01:00
Transaction.java Update license headers 2018-02-26 14:27:33 +01:00
TransactionBuilder.java Update license headers 2018-02-26 14:27:33 +01:00