mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 03:16:51 +01:00
Send results of AbstractBleProfile synchronously
This should fix issues like a ConditionalWriteAction failing with an NPE when GBDevice.getFirmwareVersion() returns null even though the DeviceInfoProfile had already received the firmware version (but the intent notification has not been received yet).
This commit is contained in:
parent
ec0d62f67b
commit
cc3c70b161
@ -53,7 +53,9 @@ public abstract class AbstractBleProfile<T extends AbstractBTLEDeviceSupport> ex
|
||||
* @param intent the intent to broadcast
|
||||
*/
|
||||
protected void notify(Intent intent) {
|
||||
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
|
||||
// note: we send synchronously in order to keep the processing order of BLE events
|
||||
// in BtleQueue and the reception of results.
|
||||
LocalBroadcastManager.getInstance(getContext()).sendBroadcastSync(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user