From 13eb5c30a27c1e0c072ad36f97e329552079a75c Mon Sep 17 00:00:00 2001 From: Dennis Guse Date: Fri, 12 Apr 2024 06:51:05 +0200 Subject: [PATCH] Bugfix: if sensors are running, do not try to start again. Fixes #1887. --- .../de/dennisguse/opentracks/services/TrackRecordingService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java b/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java index d17115087..3e5ef57eb 100644 --- a/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java +++ b/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java @@ -205,6 +205,7 @@ public void tryStartSensors() { private synchronized void startSensors() { if (isSensorStarted()) { Log.i(TAG, "sensors already started; skipping"); + return; } Log.i(TAG, "startSensors"); wakeLock = SystemUtils.acquireWakeLock(this, wakeLock);