@Override public void onDismiss(DialogInterface dialog) { super.onDismiss(dialog); if (mTask != null) { mTask.cancel(true); mTask = null; } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); setCancelable(false); UpdateTaskData data = getArguments().getParcelable(PARAM_UPDATE_DATA); mTask = new UpdateTask(getActivity(), this); mTask.execute(data); }