Loading src/org/dmfs/tasks/groupings/ByDueDate.java +5 −4 Original line number Diff line number Diff line Loading @@ -329,10 +329,11 @@ public class ByDueDate extends AbstractGroupingFactory @Override ExpandableChildDescriptor makeExpandableChildDescriptor(String authority) { // Note that we're using INSTANCE_DUE_SORTING to get correct grouping of all-day tasks return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (((" + Instances.INSTANCE_DUE_SORTING + ">=?) and (" + Instances.INSTANCE_DUE_SORTING + "<?)) or ((" + Instances.INSTANCE_DUE_SORTING + ">=? or " + Instances.INSTANCE_DUE_SORTING + " is ?) and ? is null))", Instances.DEFAULT_SORT_ORDER, 0, 1, 0, 1, 1).setViewDescriptor(TASK_VIEW_DESCRIPTOR); return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (" + Instances.IS_ALLDAY + "=0 and (((" + Instances.INSTANCE_DUE + ">=?) and (" + Instances.INSTANCE_DUE + "<?)) or ((" + Instances.INSTANCE_DUE + ">=? or " + Instances.INSTANCE_DUE + " is ?) and ? is null))" + "or " + Instances.IS_ALLDAY + "=1 and (((" + Instances.INSTANCE_DUE + ">=?+?) and (" + Instances.INSTANCE_DUE + "<?+?)) or ((" + Instances.INSTANCE_DUE + ">=?+? or " + Instances.INSTANCE_DUE + " is ?) and ? is null)))", Instances.DEFAULT_SORT_ORDER, 0, 1, 0, 1, 1, 0, 9, 1, 10, 0, 9, 1, 1).setViewDescriptor(TASK_VIEW_DESCRIPTOR); } Loading src/org/dmfs/tasks/groupings/ByStartDate.java +5 −4 Original line number Diff line number Diff line Loading @@ -328,10 +328,11 @@ public class ByStartDate extends AbstractGroupingFactory ExpandableChildDescriptor makeExpandableChildDescriptor(String authority) { // Note that we're using INSTANCE_START_SORTING to get correct grouping of all-day tasks return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (((" + Instances.INSTANCE_START_SORTING + ">=?) and (" + Instances.INSTANCE_START_SORTING + "<?)) or ((" + Instances.INSTANCE_START_SORTING + ">=? or " + Instances.INSTANCE_START_SORTING + " is ?) and ? is null))", Instances.INSTANCE_START_SORTING, 0, 1, 0, 1, 1) .setViewDescriptor(TASK_VIEW_DESCRIPTOR); return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (" + Instances.IS_ALLDAY + "=0 and (((" + Instances.INSTANCE_START + ">=?) and (" + Instances.INSTANCE_START + "<?)) or ((" + Instances.INSTANCE_START + ">=? or " + Instances.INSTANCE_START + " is ?) and ? is null)) or " + Instances.IS_ALLDAY + "=1 and (((" + Instances.INSTANCE_START + ">=?+?) and (" + Instances.INSTANCE_START + "<?+?)) or ((" + Instances.INSTANCE_START + ">=?+? or " + Instances.INSTANCE_START + " is ?) and ? is null)))", Instances.INSTANCE_START, 0, 1, 0, 1, 1, 0, 9, 1, 10, 0, 9, 1, 1).setViewDescriptor(TASK_VIEW_DESCRIPTOR); } Loading src/org/dmfs/tasks/groupings/cursorloaders/TimeRangeCursorFactory.java +16 −2 Original line number Diff line number Diff line Loading @@ -93,8 +93,12 @@ public class TimeRangeCursorFactory extends AbstractCustomCursorFactory public final static String RANGE_NULL_ROW = "null_row"; public final static String RANGE_START_TZ_OFFSET = "start_tz_offset"; public final static String RANGE_END_TZ_OFFSET = "end_tz_offset"; public static final String[] DEFAULT_PROJECTION = new String[] { RANGE_START, RANGE_END, RANGE_ID, RANGE_YEAR, RANGE_MONTH, RANGE_OPEN_PAST, RANGE_OPEN_FUTURE, RANGE_NULL_ROW, RANGE_TYPE }; RANGE_OPEN_FUTURE, RANGE_NULL_ROW, RANGE_TYPE, RANGE_START_TZ_OFFSET, RANGE_END_TZ_OFFSET }; protected final static long MAX_TIME = Long.MAX_VALUE / 2; protected final static long MIN_TIME = Long.MIN_VALUE / 2; Loading @@ -121,7 +125,7 @@ public class TimeRangeCursorFactory extends AbstractCustomCursorFactory MatrixCursor result = new MatrixCursor(mProjection); // get time of today 00:00:00 Time time = new Time("UTC"); Time time = new Time(mTimezone.getID()); time.set(mTime.monthDay, mTime.month, mTime.year); // null row, for tasks without due date Loading Loading @@ -203,11 +207,21 @@ public class TimeRangeCursorFactory extends AbstractCustomCursorFactory if (start == null || start <= MIN_TIME) { insertValue(result, RANGE_OPEN_PAST, 1); insertValue(result, RANGE_START_TZ_OFFSET, 0); } else { insertValue(result, RANGE_START_TZ_OFFSET, mTimezone.getOffset(start)); } if (end == null || end >= MAX_TIME) { insertValue(result, RANGE_OPEN_FUTURE, 1); insertValue(result, RANGE_END_TZ_OFFSET, 0); } else { insertValue(result, RANGE_END_TZ_OFFSET, mTimezone.getOffset(end)); } if (start == null && end == null) Loading src/org/dmfs/tasks/groupings/cursorloaders/TimeRangeShortCursorFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class TimeRangeShortCursorFactory extends TimeRangeCursorFactory MatrixCursor result = new MatrixCursor(mProjection); Time time = new Time("UTC"); Time time = new Time(mTimezone.getID()); time.set(mTime.monthDay + 1, mTime.month, mTime.year); // today row (including overdue) Loading Loading
src/org/dmfs/tasks/groupings/ByDueDate.java +5 −4 Original line number Diff line number Diff line Loading @@ -329,10 +329,11 @@ public class ByDueDate extends AbstractGroupingFactory @Override ExpandableChildDescriptor makeExpandableChildDescriptor(String authority) { // Note that we're using INSTANCE_DUE_SORTING to get correct grouping of all-day tasks return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (((" + Instances.INSTANCE_DUE_SORTING + ">=?) and (" + Instances.INSTANCE_DUE_SORTING + "<?)) or ((" + Instances.INSTANCE_DUE_SORTING + ">=? or " + Instances.INSTANCE_DUE_SORTING + " is ?) and ? is null))", Instances.DEFAULT_SORT_ORDER, 0, 1, 0, 1, 1).setViewDescriptor(TASK_VIEW_DESCRIPTOR); return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (" + Instances.IS_ALLDAY + "=0 and (((" + Instances.INSTANCE_DUE + ">=?) and (" + Instances.INSTANCE_DUE + "<?)) or ((" + Instances.INSTANCE_DUE + ">=? or " + Instances.INSTANCE_DUE + " is ?) and ? is null))" + "or " + Instances.IS_ALLDAY + "=1 and (((" + Instances.INSTANCE_DUE + ">=?+?) and (" + Instances.INSTANCE_DUE + "<?+?)) or ((" + Instances.INSTANCE_DUE + ">=?+? or " + Instances.INSTANCE_DUE + " is ?) and ? is null)))", Instances.DEFAULT_SORT_ORDER, 0, 1, 0, 1, 1, 0, 9, 1, 10, 0, 9, 1, 1).setViewDescriptor(TASK_VIEW_DESCRIPTOR); } Loading
src/org/dmfs/tasks/groupings/ByStartDate.java +5 −4 Original line number Diff line number Diff line Loading @@ -328,10 +328,11 @@ public class ByStartDate extends AbstractGroupingFactory ExpandableChildDescriptor makeExpandableChildDescriptor(String authority) { // Note that we're using INSTANCE_START_SORTING to get correct grouping of all-day tasks return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (((" + Instances.INSTANCE_START_SORTING + ">=?) and (" + Instances.INSTANCE_START_SORTING + "<?)) or ((" + Instances.INSTANCE_START_SORTING + ">=? or " + Instances.INSTANCE_START_SORTING + " is ?) and ? is null))", Instances.INSTANCE_START_SORTING, 0, 1, 0, 1, 1) .setViewDescriptor(TASK_VIEW_DESCRIPTOR); return new ExpandableChildDescriptor(Instances.getContentUri(authority), INSTANCE_PROJECTION, Instances.VISIBLE + "=1 and (" + Instances.IS_ALLDAY + "=0 and (((" + Instances.INSTANCE_START + ">=?) and (" + Instances.INSTANCE_START + "<?)) or ((" + Instances.INSTANCE_START + ">=? or " + Instances.INSTANCE_START + " is ?) and ? is null)) or " + Instances.IS_ALLDAY + "=1 and (((" + Instances.INSTANCE_START + ">=?+?) and (" + Instances.INSTANCE_START + "<?+?)) or ((" + Instances.INSTANCE_START + ">=?+? or " + Instances.INSTANCE_START + " is ?) and ? is null)))", Instances.INSTANCE_START, 0, 1, 0, 1, 1, 0, 9, 1, 10, 0, 9, 1, 1).setViewDescriptor(TASK_VIEW_DESCRIPTOR); } Loading
src/org/dmfs/tasks/groupings/cursorloaders/TimeRangeCursorFactory.java +16 −2 Original line number Diff line number Diff line Loading @@ -93,8 +93,12 @@ public class TimeRangeCursorFactory extends AbstractCustomCursorFactory public final static String RANGE_NULL_ROW = "null_row"; public final static String RANGE_START_TZ_OFFSET = "start_tz_offset"; public final static String RANGE_END_TZ_OFFSET = "end_tz_offset"; public static final String[] DEFAULT_PROJECTION = new String[] { RANGE_START, RANGE_END, RANGE_ID, RANGE_YEAR, RANGE_MONTH, RANGE_OPEN_PAST, RANGE_OPEN_FUTURE, RANGE_NULL_ROW, RANGE_TYPE }; RANGE_OPEN_FUTURE, RANGE_NULL_ROW, RANGE_TYPE, RANGE_START_TZ_OFFSET, RANGE_END_TZ_OFFSET }; protected final static long MAX_TIME = Long.MAX_VALUE / 2; protected final static long MIN_TIME = Long.MIN_VALUE / 2; Loading @@ -121,7 +125,7 @@ public class TimeRangeCursorFactory extends AbstractCustomCursorFactory MatrixCursor result = new MatrixCursor(mProjection); // get time of today 00:00:00 Time time = new Time("UTC"); Time time = new Time(mTimezone.getID()); time.set(mTime.monthDay, mTime.month, mTime.year); // null row, for tasks without due date Loading Loading @@ -203,11 +207,21 @@ public class TimeRangeCursorFactory extends AbstractCustomCursorFactory if (start == null || start <= MIN_TIME) { insertValue(result, RANGE_OPEN_PAST, 1); insertValue(result, RANGE_START_TZ_OFFSET, 0); } else { insertValue(result, RANGE_START_TZ_OFFSET, mTimezone.getOffset(start)); } if (end == null || end >= MAX_TIME) { insertValue(result, RANGE_OPEN_FUTURE, 1); insertValue(result, RANGE_END_TZ_OFFSET, 0); } else { insertValue(result, RANGE_END_TZ_OFFSET, mTimezone.getOffset(end)); } if (start == null && end == null) Loading
src/org/dmfs/tasks/groupings/cursorloaders/TimeRangeShortCursorFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class TimeRangeShortCursorFactory extends TimeRangeCursorFactory MatrixCursor result = new MatrixCursor(mProjection); Time time = new Time("UTC"); Time time = new Time(mTimezone.getID()); time.set(mTime.monthDay + 1, mTime.month, mTime.year); // today row (including overdue) Loading