forked from upstream-mirrors/OpenTracks
TrackRecordingService: use main looper explicitly.
This commit is contained in:
@@ -19,6 +19,7 @@ package de.dennisguse.opentracks.services;
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.PowerManager.WakeLock;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
@@ -101,7 +102,7 @@ public class TrackRecordingService extends Service implements TrackPointCreator.
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
handler = new Handler();
|
||||
handler = new Handler(Looper.getMainLooper());
|
||||
|
||||
recordingStatusObservable = new MutableLiveData<>();
|
||||
updateRecordingStatus(STATUS_DEFAULT);
|
||||
|
||||
Reference in New Issue
Block a user