private void startContentSynchronizations(List<SyncOperation> filesToSyncContents,OwnCloudClient client) throws OperationCancelledException {
  Log_OC.v(TAG,"Starting content synchronization... ");
  RemoteOperationResult contentsResult=null;
  for (  SyncOperation op : filesToSyncContents) {
    if (mCancellationRequested.get()) {
      throw new OperationCancelledException();
    }
    contentsResult=op.execute(getStorageManager(),mContext);
    if (!contentsResult.isSuccess()) {
      if (contentsResult.getCode() == ResultCode.SYNC_CONFLICT) {
        mConflictsFound++;
      }
 else {
        mFailsInFileSyncsFound++;
        if (contentsResult.getException() != null) {
          Log_OC.e(TAG,"Error while synchronizing file : " + contentsResult.getLogMessage(),contentsResult.getException());
        }
 else {
          Log_OC.e(TAG,"Error while synchronizing file : " + contentsResult.getLogMessage());
        }
      }
    }
  }
}

private void startContentSynchronizations ( List < SyncOperation > filesToSyncContents , OwnCloudClient client ) throws OperationCancelledException { Log_OC . v ( TAG , "Starting content synchronization... " ) ; RemoteOperationResult contentsResult = null ; for ( SyncOperation op : filesToSyncContents ) { if ( mCancellationRequested . get ( ) ) { throw new OperationCancelledException ( ) ; } contentsResult = op . execute ( getStorageManager ( ) , mContext ) ; if ( ! contentsResult . isSuccess ( ) ) { if ( contentsResult . getCode ( ) == ResultCode . SYNC_CONFLICT ) { mConflictsFound ++ ; } else { mFailsInFileSyncsFound ++ ; if ( contentsResult . getException ( ) != null ) { Log_OC . e ( TAG , "Error while synchronizing file : " + contentsResult . getLogMessage ( ) , contentsResult . getException ( ) ) ; } else { Log_OC . e ( TAG , "Error while synchronizing file : " + contentsResult . getLogMessage ( ) ) ; } } } } }
performs a list of synchronization operations , determining if a download or upload is needed or if exists conflict due to changes both in local and remote contents of the each file . if download or upload is needed , request the operation to the corresponding service and goes on .
