|
@@ -20,6 +20,7 @@
|
|
|
package com.owncloud.android.operations;
|
|
|
|
|
|
import android.accounts.Account;
|
|
|
+import android.annotation.SuppressLint;
|
|
|
import android.content.Context;
|
|
|
import android.net.Uri;
|
|
|
import android.os.Build;
|
|
@@ -374,6 +375,7 @@ public class UploadFileOperation extends SyncOperation {
|
|
|
OCFile parent = getStorageManager().getFileByPath(remoteParentPath);
|
|
|
mFile.setParentId(parent.getFileId());
|
|
|
|
|
|
+
|
|
|
if (parent.isEncrypted() && !mFolderUnlockToken.isEmpty()) {
|
|
|
UnlockFileOperation unlockFileOperation = new UnlockFileOperation(parent.getLocalId(), mFolderUnlockToken);
|
|
|
RemoteOperationResult unlockFileOperationResult = unlockFileOperation.execute(client);
|
|
@@ -403,6 +405,7 @@ public class UploadFileOperation extends SyncOperation {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @SuppressLint("AndroidLintUseSparseArrays")
|
|
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
|
private RemoteOperationResult encryptedUpload(OwnCloudClient client, OCFile parentFile) {
|
|
|
RemoteOperationResult result = null;
|
|
@@ -641,7 +644,7 @@ public class UploadFileOperation extends SyncOperation {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
result = mUploadOperation.execute(client);
|
|
|
|
|
|
|
|
@@ -735,7 +738,6 @@ public class UploadFileOperation extends SyncOperation {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if (result.isSuccess()) {
|
|
|
handleSuccessfulUpload(temporalFile, expectedFile, originalFile, client);
|
|
|
unlockFolder(parentFile, client, token);
|