Track recording service handles the status of recording: track's id, pause and GPS status.

Created an interface for all components that want to know about recording status through the service.
All interface's methods are optional so every component can implement what they need.
Fixes #388.
This commit is contained in:
Román Martínez
2021-03-23 20:08:25 +01:00
parent f3cf1a2571
commit e09b04308c
26 changed files with 426 additions and 466 deletions
@@ -362,9 +362,9 @@ public class ContentProviderUtils {
}
/**
* @return -1 if not able to get the next marker number.
* @return null if not able to get the next marker number.
*/
public int getNextMarkerNumber(@NonNull Track.Id trackId) {
public Integer getNextMarkerNumber(@NonNull Track.Id trackId) {
String[] projection = {MarkerColumns._ID};
String selection = MarkerColumns.TRACKID + "=?";
String[] selectionArgs = new String[]{Long.toString(trackId.getId())};
@@ -373,7 +373,7 @@ public class ContentProviderUtils {
return cursor.getCount();
}
}
return -1;
return null;
}
public Marker getMarker(@NonNull Marker.Id markerId) {