forked from upstream-mirrors/OpenTracks
Bluetooth: use TrackRecording handler for callback.
Otherwise the thread is not defined and a SecurityException may be triggered when inserting data into the ContentProvider. Sadly, below API26 this needs to be done manually. Fixes #1165.
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ public class TrackRecordingServiceTestUtils {
|
||||
TrackRecordingService service = ((TrackRecordingService.Binder) mServiceRule.bindService(new Intent(context, TrackRecordingService.class)))
|
||||
.getService();
|
||||
|
||||
service.getTrackPointCreator().setRemoteSensorManager(new BluetoothRemoteSensorManager(context, service.getTrackPointCreator()));
|
||||
service.getTrackPointCreator().setRemoteSensorManager(new BluetoothRemoteSensorManager(context, null, service.getTrackPointCreator()));
|
||||
service.getTrackPointCreator().setClock(Clock.systemUTC());
|
||||
service.endCurrentTrack();
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class TrackPointCreatorTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
subject = new TrackPointCreator(locationHandler, server);
|
||||
subject.start(context);
|
||||
subject.start(context, null);
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user