public void cancel(){
  if (mUploadOperation == null) {
    if (mUploadStarted.get()) {
      Log_OC.d(TAG,"Cancelling upload during upload preparations.");
      mCancellationRequested.set(true);
    }
 else {
      Log_OC.e(TAG,"No upload in progress. This should not happen.");
    }
  }
 else {
    Log_OC.d(TAG,"Cancelling upload during actual upload operation.");
    mUploadOperation.cancel();
  }
}

public void cancel ( ) { if ( mUploadOperation == null ) { if ( mUploadStarted . get ( ) ) { Log_OC . d ( TAG , "Cancelling upload during upload preparations." ) ; mCancellationRequested . set ( true ) ; } else { Log_OC . e ( TAG , "No upload in progress. This should not happen." ) ; } } else { Log_OC . d ( TAG , "Cancelling upload during actual upload operation." ) ; mUploadOperation . cancel ( ) ; } }
allows to cancel the actual upload operation . if actual upload operating is in progress it is cancelled , if upload preparation is being performed upload will not take place .
