Bugfix: TrackListActivity triggered TrackRecordingService twice (startSensors and startRecording).

Part of #1780.
This commit is contained in:
Dennis Guse
2023-12-25 20:49:49 +01:00
parent 150cbee95b
commit 0ee4a4e72f
2 changed files with 15 additions and 19 deletions
@@ -127,9 +127,6 @@ public class TrackRecordingServiceConnection implements ServiceConnection, Death
setTrackRecordingService(null);
}
/**
* Unbinds and stops the service.
*/
public void unbindAndStop(Context context) {
unbind(context);
context.stopService(new Intent(context, TrackRecordingService.class));
@@ -153,7 +150,7 @@ public class TrackRecordingServiceConnection implements ServiceConnection, Death
@Override
public void onServiceConnected(ComponentName className, IBinder service) {
Log.i(TAG, "Connected to the service.");
Log.i(TAG, "Connected to the service: " + service);
try {
service.linkToDeath(this, 0);
} catch (RemoteException e) {