Back to project page android-calendar-drafts.
The source code is released under:
Apache License
If you think the Android project android-calendar-drafts listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.touchableheroes.drafts.calendar.cmd; /*from w w w. j a v a 2s .c o m*/ import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; import android.net.Uri; /** * deletes an event by id/uri. * * @author asiebert */ public class DeleteEventCmd extends ContextCmd { public DeleteEventCmd(final Context ctx) { super(ctx); } public boolean exec(final Uri idUri) { final ContentResolver cr = getContentResolver(); final ContentValues values = new ContentValues(); final int deleted = cr.delete(idUri, null, null); return (deleted > 0); } }