import android.util.Log;
//import android.support.v4.content.LocalBroadcastManager;
+import com.owncloud.android.MainApp;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
* @param syncFullAccount 'True' means that this operation is part of a full account
* synchronization.
* @param isShareSupported 'True' means that the server supports the sharing API.
- * @param ignoreEtag 'True' means that the content of the remote folder should
+ * @param ignoreETag 'True' means that the content of the remote folder should
* be fetched and updated even though the 'eTag' did not
* change.
* @param dataStorageManager Interface with the local database.
private void updateOCVersion(OwnCloudClient client) {
UpdateOCVersionOperation update = new UpdateOCVersionOperation(mAccount, mContext);
- RemoteOperationResult result = update.execute(client);
+ RemoteOperationResult result = update.execute(client, MainApp.getUserAgent());
if (result.isSuccess()) {
mIsShareSupported = update.getOCVersion().isSharedSupported();
}
// remote request
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath);
- result = operation.execute(client);
+ result = operation.execute(client, MainApp.getUserAgent());
if (result.isSuccess()){
OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile) result.getData().get(0));
private RemoteOperationResult fetchAndSyncRemoteFolder(OwnCloudClient client) {
String remotePath = mLocalFolder.getRemotePath();
ReadRemoteFolderOperation operation = new ReadRemoteFolderOperation(remotePath);
- RemoteOperationResult result = operation.execute(client);
+ RemoteOperationResult result = operation.execute(client, MainApp.getUserAgent());
Log_OC.d(TAG, "Synchronizing " + mAccount.name + remotePath);
if (result.isSuccess()) {
remoteFile.setFileLength(localFile.getFileLength());
// TODO move operations about size of folders to FileContentProvider
} else if (mRemoteFolderChanged && remoteFile.isImage() &&
- remoteFile.getModificationTimestamp() != localFile.getModificationTimestamp()) {
+ remoteFile.getModificationTimestamp() !=
+ localFile.getModificationTimestamp()) {
remoteFile.setNeedsUpdateThumbnail(true);
Log.d(TAG, "Image " + remoteFile.getFileName() + " updated on the server");
}
// remote request
GetRemoteSharesForFileOperation operation =
new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), false, true);
- result = operation.execute(client);
+ result = operation.execute(client, MainApp.getUserAgent());
if (result.isSuccess()) {
// update local database