]> iEval git - unical.git/commitdiff
Clean up previous commit
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Jun 2013 08:26:18 +0000 (11:26 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Jun 2013 08:26:18 +0000 (11:26 +0300)
src/ro/ieval/unical/Event.java

index 8482e31d128e7f6b87635dc831b9778a4518ef20..f8e35cc78203125d6fd32f0e531b677735d6ca8c 100644 (file)
@@ -83,13 +83,10 @@ final class Event implements Parcelable{
        }
        
        public static Event[] getAllEvents(final Context context) {
-               Calendar[] calendars = Calendar.getAllCalendars(context);
-               ArrayList<Event> r = new ArrayList<Event>();
-               for(int i=0; i<calendars.length; ++i) {
-                       Event[] e=getEventsByCalendar(context, calendars[i]._id, "");
-                       for(int j=0; j<e.length; ++j)
-                               r.add(e[j]);
-               }
+               final ArrayList<Event> r = new ArrayList<Event>();
+               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()]);
        }
 
This page took 0.023674 seconds and 4 git commands to generate.