]> iEval git - unical.git/commitdiff
Add delete method to Event
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 29 May 2013 09:21:24 +0000 (12:21 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 29 May 2013 09:21:24 +0000 (12:21 +0300)
src/ro/ieval/unical/Event.java

index 38dd137a259f878b3d37be3a575d52cddd523b70..095d07a56ac7481600ba33b3b0df78fbce80fc89 100644 (file)
@@ -3,6 +3,7 @@ package ro.ieval.unical;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.Cursor;
+import android.net.Uri;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.provider.CalendarContract.Events;
@@ -74,6 +75,11 @@ final class Event implements Parcelable{
                return events;
        }
 
+       public void delete(final Context context){
+               final ContentResolver cr=context.getContentResolver();
+               cr.delete(Uri.withAppendedPath(Events.CONTENT_URI, Long.toString(_id)), null, null);
+       }
+
        @Override
        public int describeContents() {
                return 0;
This page took 0.026856 seconds and 4 git commands to generate.