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; /* w ww .j av a 2 s . c o m*/ import android.app.Activity; import android.content.ContentResolver; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; public class ExistsEventCmd extends ContextCmd { public ExistsEventCmd(final Activity activity) { super(activity); } public boolean exec(final Uri idUri) { final ContentResolver cr = getContentResolver(); final ContentValues values = new ContentValues(); final Cursor query = cr.query(idUri, null, null, null, null); final int count = query.getCount(); query.close(); return (count > 0); } }