Commit e89955bb authored by korelstar's avatar korelstar Committed by Ricki Hirner

Ignore DTSTART instead of DUE, if DTSTART>DUE

parent 09860091
Pipeline #4795172 (#) passed with stage
in 8 minutes and 4 seconds
......@@ -126,7 +126,7 @@ public class AndroidTaskTest extends InstrumentationTestCase {
@Cleanup("delete") TestTask testTask = new TestTask(taskList, ContentUris.parseId(uri));
assertNotNull("Inserted task is not here", testTask);
Task task2 = testTask.getTask();
assertNull(task.due);
assertNull(task.dtStart);
}
public void testUpdateTask() throws URISyntaxException, ParseException, FileNotFoundException, CalendarStorageException {
......
......@@ -320,8 +320,8 @@ public abstract class AndroidTask {
if (task.dtStart != null && task.due != null && task.due.getDate().before(task.dtStart.getDate())) {
// there seem to be many invalid tasks out there because of some defect clients
Constants.log.warning("Invalid DUE before DTSTART; ignoring");
task.due = null;
Constants.log.warning("Invalid DTSTART after DUE; ignoring");
task.dtStart = null;
}
builder.withValue(Tasks.DTSTART, task.dtStart != null ? task.dtStart.getDate().getTime() : null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment