Bump backup format version

pull/618/head
Alex Baker 8 years ago
parent 515223b6a7
commit f4de1bf0df

@ -74,8 +74,7 @@ public class TasksXmlExporter {
private UserActivityDao userActivityDao; private UserActivityDao userActivityDao;
private final Preferences preferences; private final Preferences preferences;
// 3 is started on Version 4.6.10 private static final int FORMAT = 4;
private static final int FORMAT = 3;
private Context context; private Context context;
private int exportCount = 0; private int exportCount = 0;
private XmlSerializer xml; private XmlSerializer xml;

@ -121,7 +121,7 @@ public class TasksXmlImporter {
String format = xpp.getAttributeValue(null, BackupConstants.ASTRID_ATTR_FORMAT); String format = xpp.getAttributeValue(null, BackupConstants.ASTRID_ATTR_FORMAT);
if(TextUtils.equals(format, FORMAT2)) { if(TextUtils.equals(format, FORMAT2)) {
new Format2TaskImporter(xpp); new Format2TaskImporter(xpp);
} else if(TextUtils.equals(format, FORMAT3)) { } else if(TextUtils.equals(format, FORMAT3) || TextUtils.equals(format, FORMAT4)) {
new Format3TaskImporter(xpp); new Format3TaskImporter(xpp);
} else { } else {
throw new UnsupportedOperationException( throw new UnsupportedOperationException(
@ -376,6 +376,7 @@ public class TasksXmlImporter {
// =============================================================== FORMAT3 // =============================================================== FORMAT3
private static final String FORMAT3 = "3"; //$NON-NLS-1$ private static final String FORMAT3 = "3"; //$NON-NLS-1$
private static final String FORMAT4 = "4"; //$NON-NLS-1$
private class Format3TaskImporter extends Format2TaskImporter { private class Format3TaskImporter extends Format2TaskImporter {
public Format3TaskImporter(XmlPullParser xpp) throws XmlPullParserException, IOException { public Format3TaskImporter(XmlPullParser xpp) throws XmlPullParserException, IOException {

Loading…
Cancel
Save