diff --git a/owncloud-android-library b/owncloud-android-library index 5b4f63ebdb..afb4ae1c2e 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit 5b4f63ebdb365c6e7e9a3e0148aa18a8d5fb5067 +Subproject commit afb4ae1c2e15dfc3b3f9a9861b75d375e38f2805 diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index f05f084642..9575a330a1 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -605,7 +605,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe ReadRemoteFileOperation operation = new ReadRemoteFileOperation(mCurrentUpload.getRemotePath()); RemoteOperationResult result = operation.execute(mUploadClient); if (result.isSuccess()) { - updateOCFile(file, result.getData().get(0)); + updateOCFile(file, (RemoteFile)result.getData().get(0)); file.setLastSyncDateForProperties(syncDate); } diff --git a/src/com/owncloud/android/operations/SynchronizeFileOperation.java b/src/com/owncloud/android/operations/SynchronizeFileOperation.java index ec51392db5..2f6d9142fe 100644 --- a/src/com/owncloud/android/operations/SynchronizeFileOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFileOperation.java @@ -23,6 +23,7 @@ import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.files.services.FileDownloader; import com.owncloud.android.files.services.FileUploader; import com.owncloud.android.lib.network.OwnCloudClient; +import com.owncloud.android.lib.operations.common.RemoteFile; import com.owncloud.android.lib.operations.common.RemoteOperation; import com.owncloud.android.lib.operations.common.RemoteOperationResult; import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode; @@ -89,7 +90,7 @@ public class SynchronizeFileOperation extends RemoteOperation { ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath); result = operation.execute(client); if (result.isSuccess()){ - mServerFile = FileStorageUtils.fillOCFile(result.getData().get(0)); + mServerFile = FileStorageUtils.fillOCFile((RemoteFile)result.getData().get(0)); mServerFile.setLastSyncDateForProperties(System.currentTimeMillis()); } } diff --git a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java index 497058a0cf..82d4d8c69c 100644 --- a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java @@ -192,7 +192,7 @@ public class SynchronizeFolderOperation extends RemoteOperation { ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath); result = operation.execute(client); if (result.isSuccess()){ - OCFile remoteFolder = FileStorageUtils.fillOCFile(result.getData().get(0)); + OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile)result.getData().get(0)); // check if remote and local folder are different mRemoteFolderChanged = !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag())); @@ -256,12 +256,12 @@ public class SynchronizeFolderOperation extends RemoteOperation { * retrieved. * @return 'True' when any change was made in the local data, 'false' otherwise. */ - private void synchronizeData(ArrayList folderAndFiles, OwnCloudClient client) { + private void synchronizeData(ArrayList folderAndFiles, OwnCloudClient client) { // get 'fresh data' from the database mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath()); // parse data from remote folder - OCFile remoteFolder = fillOCFile(folderAndFiles.get(0)); + OCFile remoteFolder = fillOCFile((RemoteFile)folderAndFiles.get(0)); remoteFolder.setParentId(mLocalFolder.getParentId()); remoteFolder.setFileId(mLocalFolder.getFileId()); @@ -281,7 +281,7 @@ public class SynchronizeFolderOperation extends RemoteOperation { OCFile remoteFile = null, localFile = null; for (int i=1; i