Skip to content

Commit

Permalink
Revert "Bugfix: PublicAPI stop should not start TrackRecordingService…
Browse files Browse the repository at this point in the history
… in foreground."

This reverts commit da3dd29.
  • Loading branch information
dennisguse committed Feb 13, 2024
1 parent 0f6803c commit bf43cdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 59 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;

import de.dennisguse.opentracks.BuildConfig;

Expand Down Expand Up @@ -80,8 +81,7 @@ public void bind(@NonNull Context context) {
}

Log.i(TAG, "Binding the service.");

int flags = Context.BIND_AUTO_CREATE + (BuildConfig.DEBUG ? Context.BIND_DEBUG_UNBIND : 0);
int flags = BuildConfig.DEBUG ? Context.BIND_DEBUG_UNBIND : 0;
context.bindService(new Intent(context, TrackRecordingService.class), serviceConnection, flags);
}

Expand Down Expand Up @@ -142,6 +142,6 @@ public static void execute(Context context, Callback callback) {
new TrackRecordingServiceConnection(withUnbind)
.bind(context);

// ContextCompat.startForegroundService(context, new Intent(context, TrackRecordingService.class));
ContextCompat.startForegroundService(context, new Intent(context, TrackRecordingService.class));
}
}

0 comments on commit bf43cdc

Please sign in to comment.