mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 06:51:55 +03:00
revert changes for sync operations
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
9c2f7e4642
commit
1bbbb95493
1 changed files with 3 additions and 7 deletions
|
@ -13,14 +13,11 @@ import android.content.Context;
|
|||
import android.os.Handler;
|
||||
|
||||
import com.nextcloud.common.NextcloudClient;
|
||||
import com.nextcloud.utils.extensions.ContextExtensionsKt;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.OnRemoteOperationListener;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
|
@ -49,11 +46,10 @@ public abstract class SyncOperation extends RemoteOperation {
|
|||
*/
|
||||
public RemoteOperationResult execute(Context context) {
|
||||
if (storageManager.getUser().isAnonymous()) {
|
||||
Log_OC.d("SyncOperation","Trying to execute a sync operation with anonymous account, operation cancelled");
|
||||
return new RemoteOperationResult(RemoteOperationResult.ResultCode.ACCOUNT_EXCEPTION);
|
||||
} else {
|
||||
return super.execute(this.storageManager.getUser(), context);
|
||||
throw new IllegalArgumentException("Trying to execute a sync operation with a " +
|
||||
"storage manager for an anonymous account");
|
||||
}
|
||||
return super.execute(this.storageManager.getUser(), context);
|
||||
}
|
||||
|
||||
public RemoteOperationResult execute(@NonNull NextcloudClient client) {
|
||||
|
|
Loading…
Reference in a new issue