cgeo/c-geo-opensource — pull request #1245 by campbeb (2012-03-07 14:43:52+00:00)
Title: Fix #1235 - Support adding events to calendar in Android version 4 

Used new functionality from API 14 to pass an Intent to add an event to the calendar. I'm not certain if this will only work for built in calendar app or all of them.
This opens a new window in calendar to add the event. Handling it the same way as versions prior to 4 would require changing `targetSdkVersion` to 14 so that we can use new functions.

The changes to existing code are:
- move common code to new functions
- don't perform lots of action inside (!= null) blocks, but return if it is null
- don't call `close()` on a cursor from managedQuery per Android documentation

Fixes #1235