forked from upstream-mirrors/OpenTracks
Removing service calls which were just delegates to the provider utils.
These weren't used anywhere, and this change makes a more clear separation between dealing with track data and dealing with the recording service.
This commit is contained in:
@@ -980,12 +980,6 @@ public class TrackRecordingService extends Service implements LocationListener {
|
|||||||
return service.recordingTrackId;
|
return service.recordingTrackId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasRecorded() {
|
|
||||||
checkService();
|
|
||||||
return service.providerUtils.getLastTrackId() >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long startNewTrack() {
|
public long startNewTrack() {
|
||||||
checkService();
|
checkService();
|
||||||
@@ -1009,15 +1003,6 @@ public class TrackRecordingService extends Service implements LocationListener {
|
|||||||
service.endCurrentTrack();
|
service.endCurrentTrack();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteAllTracks() {
|
|
||||||
checkService();
|
|
||||||
if (isRecording()) {
|
|
||||||
throw new IllegalStateException("Cannot delete all tracks while recording!");
|
|
||||||
}
|
|
||||||
service.providerUtils.deleteAllTracks();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void recordLocation(Location loc) {
|
public void recordLocation(Location loc) {
|
||||||
checkService();
|
checkService();
|
||||||
|
|||||||
+3
-14
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008 Google Inc.
|
* Copyright 2008 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -66,17 +66,6 @@ interface ITrackRecordingService {
|
|||||||
*/
|
*/
|
||||||
void endCurrentTrack();
|
void endCurrentTrack();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether at least one track has been or is being recorded (and was
|
|
||||||
* not deleted).
|
|
||||||
*/
|
|
||||||
boolean hasRecorded();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deletes all the stored tracks.
|
|
||||||
*/
|
|
||||||
void deleteAllTracks();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current sensor data.
|
* The current sensor data.
|
||||||
* The data is returned as a byte array which is a binary version of a
|
* The data is returned as a byte array which is a binary version of a
|
||||||
|
|||||||
Reference in New Issue
Block a user