Refactoring to marker: data class and ContentProviderUtils.

#389
This commit is contained in:
Dennis Guse
2020-09-05 10:13:01 +02:00
parent 6533e3e170
commit 74e09e1fa9
40 changed files with 421 additions and 453 deletions
@@ -35,7 +35,7 @@ import de.dennisguse.opentracks.util.PreferencesUtils;
* @author Leif Hendrik Wilden
* @author Rodrigo Damazio
*/
public final class Waypoint {
public final class Marker {
private Id id;
private String name = "";
@@ -50,15 +50,15 @@ public final class Waypoint {
private String photoUrl = "";
@VisibleForTesting
public Waypoint(@NonNull TrackPoint trackPoint) {
public Marker(@NonNull TrackPoint trackPoint) {
this.location = trackPoint.getLocation();
}
public Waypoint(@NonNull Location location) {
public Marker(@NonNull Location location) {
this.location = location;
}
public Waypoint(String name, String description, String category, String icon, @NonNull Track.Id trackId, double length, long duration, @NonNull Location location, String photoUrl) {
public Marker(String name, String description, String category, String icon, @NonNull Track.Id trackId, double length, long duration, @NonNull Location location, String photoUrl) {
this.name = name;
this.description = description;
this.category = category;
@@ -26,7 +26,7 @@ import de.dennisguse.opentracks.content.provider.ContentProviderUtils;
*
* @author Leif Hendrik Wilden
*/
public interface WaypointsColumns extends BaseColumns {
public interface MarkerColumns extends BaseColumns {
String TABLE_NAME = "waypoints";
Uri CONTENT_URI = Uri.parse(ContentProviderUtils.CONTENT_BASE_URI + "/" + TABLE_NAME);