Activity with progress and summary for import all option. Fixes #471.

ErrorListDialog shared by ExportActivity and ImportActivity.
This commit is contained in:
Román Martínez
2020-10-23 18:57:37 +02:00
parent 48c3695b5d
commit acc2627bde
19 changed files with 701 additions and 445 deletions
@@ -1,6 +1,7 @@
package de.dennisguse.opentracks.io.file.importer;
import android.content.Context;
import android.database.sqlite.SQLiteConstraintException;
import android.util.Log;
import android.util.Pair;
@@ -9,7 +10,9 @@ import androidx.test.filters.LargeTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -59,6 +62,9 @@ public class ExportImportTest {
private Track.Id importTrackId;
private final Track.Id trackId = new Track.Id(System.currentTimeMillis());
@Rule
public ExpectedException exception = ExpectedException.none();
@Before
public void setUp() {
Pair<Track, TrackPoint[]> track = TestDataUtil.createTrack(trackId, 10);
@@ -181,6 +187,8 @@ public class ExportImportTest {
TrackExporter trackExporter = TrackFileFormat.KML_WITH_TRACKDETAIL_AND_SENSORDATA.newTrackExporter(context);
exception.expect(ImportAlreadyExistsException.class);
// when
// 1. export
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
@@ -270,6 +278,8 @@ public class ExportImportTest {
TrackExporter trackExporter = TrackFileFormat.GPX.newTrackExporter(context);
exception.expect(ImportAlreadyExistsException.class);
// when
// 1. export
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();