ContentProviderUtils.bulkInsertTrackPoint(): removed length parameter.

This commit is contained in:
Dennis Guse
2020-04-14 19:42:17 +02:00
parent ec39e67a09
commit f485d90ef2
8 changed files with 25 additions and 28 deletions
@@ -634,17 +634,13 @@ public class ContentProviderUtils {
* Inserts multiple trackPoints.
*
* @param trackPoints an array of trackPoints
* @param length the number of trackPoints (from the beginning of the array) to insert, or -1 for all of them
* @param trackId the trackPoints id
* @return the number of trackPoints inserted
*/
//TODO Only used for testing and file import; might be better to replace it; in any case remove length.
public int bulkInsertTrackPoint(TrackPoint[] trackPoints, int length, long trackId) {
if (length == -1) {
length = trackPoints.length;
}
ContentValues[] values = new ContentValues[length];
for (int i = 0; i < length; i++) {
//TODO Only used for testing and file import; might be better to replace it.
public int bulkInsertTrackPoint(TrackPoint[] trackPoints, long trackId) {
ContentValues[] values = new ContentValues[trackPoints.length];
for (int i = 0; i < values.length; i++) {
values[i] = createContentValues(trackPoints[i], trackId);
}
return contentResolver.bulkInsert(TrackPointsColumns.CONTENT_URI_BY_ID, values);