Public API: allow marker creation.

Fixes #2031.
This commit is contained in:
Dennis Guse
2024-12-19 18:39:53 +01:00
parent 26c660ec5b
commit 522d9ebe2e
9 changed files with 65 additions and 25 deletions
@@ -487,12 +487,11 @@ public class ContentProviderUtils {
return markers;
}
/**
* @return the content provider URI of the inserted marker.
*/
public Uri insertMarker(@NonNull Marker marker) {
// TODO Merge with updateMarker
public Marker.Id insertMarker(@NonNull Marker marker) {
marker.setId(null);
return contentResolver.insert(MarkerColumns.CONTENT_URI, createContentValues(marker));
Uri uri = contentResolver.insert(MarkerColumns.CONTENT_URI, createContentValues(marker));
return new Marker.Id(ContentUris.parseId(uri));
}
private void deleteMarkerPhoto(Context context, Marker marker) {