forked from upstream-mirrors/OpenTracks
Bugfix: TrackListActivity couldn't stop and restart sensors.
Part of #1780.
This commit is contained in:
@@ -125,6 +125,9 @@ public class TrackRecordingService extends Service implements TrackPointCreator.
|
||||
if (isRecording()) {
|
||||
endCurrentTrack();
|
||||
}
|
||||
if (isSensorStarted()) {
|
||||
stopSensors();
|
||||
}
|
||||
|
||||
PreferencesUtils.unregisterOnSharedPreferenceChangeListener(this);
|
||||
|
||||
@@ -248,6 +251,7 @@ public class TrackRecordingService extends Service implements TrackPointCreator.
|
||||
stopForeground(true);
|
||||
notificationManager.cancelNotification();
|
||||
wakeLock = SystemUtils.releaseWakeLock(wakeLock);
|
||||
gpsStatusObservable.postValue(STATUS_GPS_DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user