From fc891ea8c0845745b2cbde20d0f4a80511fa2228 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 30 May 2013 00:35:24 +0300 Subject: [PATCH] Add sort order to Event#getEventsByCalendar --- src/ro/ieval/unical/Event.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ro/ieval/unical/Event.java b/src/ro/ieval/unical/Event.java index 85ad215..2842638 100644 --- a/src/ro/ieval/unical/Event.java +++ b/src/ro/ieval/unical/Event.java @@ -64,13 +64,13 @@ final class Event implements Parcelable{ this.calendarID=calendarID; } - public static Event[] getEventsByCalendar(final Context context, final int calendarID){ + public static Event[] getEventsByCalendar(final Context context, final int calendarID, final String sort){ final ContentResolver cr=context.getContentResolver(); final Cursor cursor = cr.query(Events.CONTENT_URI, PROJECTION, Events.CALENDAR_ID+" = ?", new String[]{Integer.toString(calendarID)}, - null); + sort); cursor.moveToFirst(); final Event[] events = new Event[cursor.getCount()]; for(int i=0;i