|
|
|
@ -96,7 +96,7 @@ public class TasksXmlExporter {
|
|
|
|
Preferences.setString(BackupPreferences.PREF_BACKUP_LAST_ERROR, null);
|
|
|
|
Preferences.setString(BackupPreferences.PREF_BACKUP_LAST_ERROR, null);
|
|
|
|
|
|
|
|
|
|
|
|
if (!isService)
|
|
|
|
if (!isService)
|
|
|
|
displayToast(output);
|
|
|
|
onFinishExport(output);
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
if(!isService)
|
|
|
|
if(!isService)
|
|
|
|
exceptionService.displayAndReportError(context,
|
|
|
|
exceptionService.displayAndReportError(context,
|
|
|
|
@ -263,14 +263,15 @@ public class TasksXmlExporter {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void displayToast(final String output) {
|
|
|
|
private void onFinishExport(final String outputFile) {
|
|
|
|
handler.post(new Runnable() {
|
|
|
|
handler.post(new Runnable() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
|
CharSequence text = String.format(context.getString(R.string.export_toast),
|
|
|
|
CharSequence text = String.format(context.getString(R.string.export_toast),
|
|
|
|
context.getResources().getQuantityString(R.plurals.Ntasks, exportCount,
|
|
|
|
context.getResources().getQuantityString(R.plurals.Ntasks, exportCount,
|
|
|
|
exportCount), output);
|
|
|
|
exportCount), outputFile);
|
|
|
|
Toast.makeText(context, text, Toast.LENGTH_LONG).show();
|
|
|
|
Toast.makeText(context, text, Toast.LENGTH_LONG).show();
|
|
|
|
|
|
|
|
progressDialog.dismiss();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|