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<events.length;i++)