Esempio n. 1
0
 public void save() {
   try {
     if (contentUri == null) {
       contentUri = client.insert(ContributionsContentProvider.BASE_URI, this.toContentValues());
     } else {
       client.update(contentUri, toContentValues(), null, null);
     }
   } catch (RemoteException e) {
     throw new RuntimeException(e);
   }
 }
 public void delete() {
   try {
     if (contentUri == null) {
       // noooo
       throw new RuntimeException("tried to delete item with no content URI");
     } else {
       client.delete(contentUri, null, null);
     }
   } catch (RemoteException e) {
     throw new RuntimeException(e);
   }
 }