From c1da3e5da33d975f4665952ee8ed41a3a5b11270 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 9 Jun 2013 11:26:18 +0300 Subject: [PATCH] Clean up previous commit --- src/ro/ieval/unical/Event.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/ro/ieval/unical/Event.java b/src/ro/ieval/unical/Event.java index 8482e31..f8e35cc 100644 --- a/src/ro/ieval/unical/Event.java +++ b/src/ro/ieval/unical/Event.java @@ -83,13 +83,10 @@ final class Event implements Parcelable{ } public static Event[] getAllEvents(final Context context) { - Calendar[] calendars = Calendar.getAllCalendars(context); - ArrayList r = new ArrayList(); - for(int i=0; i r = new ArrayList(); + for(final Calendar calendar : Calendar.getAllCalendars(context)) + for(final Event event : getEventsByCalendar(context, calendar._id, null)) + r.add(event); return r.toArray(new Event[r.size()]); } -- 2.39.2