public static int update(
      ContentProvider provider, Uri contentUri, long id, ContentValues values) {

    Uri uri = ContentUris.withAppendedId(contentUri, id);

    return provider.update(uri, values, null, null);
  }
  public static int update(
      ContentProvider provider, Uri contentUri, long id, String key, long value) {

    Uri uri = ContentUris.withAppendedId(contentUri, id);

    ContentValues values = new ContentValues();

    values.put(key, value);
    return provider.update(uri, values, null, null);
  }
 // NOTE: active commands (query, delete, ..) are called to try to
 // invoke provider code.  Real access happens in the Client code
 // and we need to conntect the Android ContentProviderClient with this.....
 @DSVerified
 @DSBan(DSCat.DROIDSAFE_INTERNAL)
 public static void modelContentProvider(android.content.ContentProvider contentProvider) {
   contentProvider.droidsafeAttachContext(context);
   contentProvider.onCreate();
   contentProvider.onConfigurationChanged(new Configuration());
   contentProvider.onLowMemory();
   contentProvider.onTrimMemory(0);
   // Its not clear if we could figure out some of the value for these parameters
   contentProvider.query(null, null, null, null, null);
   contentProvider.insert(null, null);
   contentProvider.update(null, null, null, null);
   contentProvider.delete(null, null, null);
   contentProvider.getType(null);
 }
  public static int updatePoint(
      ContentProvider provider,
      Uri contentUri,
      long id,
      String latKeyE6,
      String longKeyE6,
      GeoPoint point) {

    Uri uri = ContentUris.withAppendedId(contentUri, id);

    ContentValues values = new ContentValues();

    values.put(latKeyE6, point.getLatitudeE6());
    values.put(longKeyE6, point.getLongitudeE6());
    return provider.update(uri, values, null, null);
  }