コード例 #1
0
  private void doSave(
      FavouritePoint favorite,
      String name,
      String category,
      String description,
      boolean needDismiss) {
    if (editor.isNew()) {
      doAddFavorite(name, category, description);
    } else {
      helper.editFavouriteName(favorite, name, category, description);
    }
    getMapActivity().refreshMap();
    if (needDismiss) {
      dismiss(false);
    }

    MapContextMenu menu = getMapActivity().getContextMenu();
    LatLon latLon = new LatLon(favorite.getLatitude(), favorite.getLongitude());
    if (menu.getLatLon().equals(latLon)) {
      menu.update(latLon, favorite.getPointDescription(), favorite);
    }
  }