This commit is contained in:
Dennis Guse
2019-09-02 18:02:43 +02:00
parent c551a38a8b
commit 0a046fc100
3 changed files with 12 additions and 12 deletions
@@ -46,7 +46,7 @@ public class ExportActivity extends FragmentActivity implements FileTypeDialogFr
private String directoryDisplayName;
private SaveAsyncTask saveAsyncTask;
private ExportAsyncTask exportAsyncTask;
private ProgressDialog progressDialog;
// the number of tracks successfully saved
@@ -81,14 +81,14 @@ public class ExportActivity extends FragmentActivity implements FileTypeDialogFr
directoryDisplayName = FileUtils.getPathDisplayName(trackFileFormat.getExtension());
//TODO (still needed?): getLastNonConfiguration instance returned SaveAsyncTask before
//TODO (still needed?): getLastNonConfiguration instance returned ExportAsyncTask before
// Object retained = getLastNonConfigurationInstance();
// if (retained instanceof SaveAsyncTask) {
// saveAsyncTask = (SaveAsyncTask) retained;
// saveAsyncTask.setActivity(this);
// if (retained instanceof ExportAsyncTask) {
// exportAsyncTask = (ExportAsyncTask) retained;
// exportAsyncTask.setActivity(this);
// } else {
saveAsyncTask = new SaveAsyncTask(this, trackFileFormat, directory);
saveAsyncTask.execute();
exportAsyncTask = new ExportAsyncTask(this, trackFileFormat, directory);
exportAsyncTask.execute();
// }
}
@@ -106,7 +106,7 @@ public class ExportActivity extends FragmentActivity implements FileTypeDialogFr
new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
saveAsyncTask.cancel(true);
exportAsyncTask.cancel(true);
dialog.dismiss();
onDismissed();
}
@@ -42,9 +42,9 @@ import de.dennisguse.opentracks.util.SystemUtils;
* @author Jimmy Shih
*/
//TODO Make independent from ExportActivity?
public class SaveAsyncTask extends AsyncTask<Void, Integer, Boolean> {
public class ExportAsyncTask extends AsyncTask<Void, Integer, Boolean> {
private static final String TAG = SaveAsyncTask.class.getSimpleName();
private static final String TAG = ExportAsyncTask.class.getSimpleName();
private final TrackFileFormat trackFileFormat;
private final File directory;
private final Context context;
@@ -71,7 +71,7 @@ public class SaveAsyncTask extends AsyncTask<Void, Integer, Boolean> {
* @param trackFileFormat the track file format
* @param directory the directory to write the file
*/
public SaveAsyncTask(ExportActivity exportActivity, TrackFileFormat trackFileFormat, File directory) {
public ExportAsyncTask(ExportActivity exportActivity, TrackFileFormat trackFileFormat, File directory) {
this.exportActivity = exportActivity;
this.trackFileFormat = trackFileFormat;
this.directory = directory;
@@ -84,7 +84,7 @@ public class ImportActivity extends FragmentActivity implements FileTypeDialogFr
return;
}
//TODO (still needed?): getLastNonConfiguration instance returned SaveAsyncTask before
//TODO (still needed?): getLastNonConfiguration instance returned ExportAsyncTask before
// Object retained = getLastNonConfigurationInstance();
// if (retained instanceof ImportAsyncTask) {
// importAsyncTask = (ImportAsyncTask) retained;