示例#1
0
  @Override
  protected void onException(Exception e) throws RuntimeException {
    super.onException(e);

    Log.e(TAG, "Exception creating issue", e);
    ToastUtils.show((Activity) getContext(), e.getMessage());
  }
  @Override
  protected void onSuccess(Gist gist) throws Exception {
    super.onSuccess(gist);

    Activity activity = (Activity) getContext();
    activity.setResult(RESULT_OK);
    activity.finish();
  }
  /**
   * Edit issue to have given milestone
   *
   * @param milestone
   * @return this task
   */
  public EditMilestoneTask edit(Milestone milestone) {
    if (milestone != null) milestoneNumber = milestone.getNumber();
    else milestoneNumber = -1;

    showIndeterminate(R.string.updating_milestone);

    super.execute();

    return this;
  }