Garmin: Fix occasional crash when support class is disposed

This commit is contained in:
José Rebelo
2026-02-03 22:48:49 +00:00
parent 2842101300
commit aefa384bbe
@@ -200,6 +200,9 @@ public class GarminSupport extends AbstractBTLESingleDeviceSupport implements IC
public void dispose() {
synchronized (ConnectionMonitor) {
LOG.info("Garmin dispose()");
if (communicator != null) {
communicator.dispose();
}
GBLocationService.stop(getContext(), getDevice());
try {
LocalBroadcastManager.getInstance(GBApplication.getContext()).unregisterReceiver(broadcastReceiver);