1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-17 19:04:03 +02:00
Gadgetbridge/app
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
..
src Use a custom IntentListener callback instead of LocalBroadcastManager for ble profiles 2018-08-18 00:39:14 +02:00
build.gradle add changelog, bump version 2018-08-06 23:46:25 +02:00
proguard-rules.pro First checkin of actual code 2015-01-07 14:00:18 +01:00