Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 038ea2fa authored by tobiasKaminsky's avatar tobiasKaminsky
Browse files

changes due to CR

parent 4f4fc359
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -62,6 +62,9 @@ public abstract class RemoteOperation implements Runnable {
    /** OCS API header value */
    public static final String OCS_API_HEADER_VALUE = "true";

    public static final String CONTENT_TYPE = "Content-Type";
    public static final String FORM_URLENCODED = "application/x-www-form-urlencoded";

    /** ownCloud account in the remote ownCloud server to operate */
    private Account mAccount = null;
    
+2 −4
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class LockFileOperation extends RemoteOperation {

            // remote request
            postMethod.addRequestHeader(OCS_API_HEADER, OCS_API_HEADER_VALUE);
            postMethod.addRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            postMethod.addRequestHeader(CONTENT_TYPE, FORM_URLENCODED);

            int status = client.executeMethod(postMethod, SYNC_READ_TIMEOUT, SYNC_CONNECTION_TIMEOUT);

@@ -104,9 +104,7 @@ public class LockFileOperation extends RemoteOperation {
            }
        } catch (Exception e) {
            result = new RemoteOperationResult(e);
            e.printStackTrace();
            Log_OC.e(TAG, "Lock file with id " + localId + " failed: " + result.getLogMessage(),
                    result.getException());
            Log_OC.e(TAG, "Lock file with id " + localId + " failed: " + result.getLogMessage(), result.getException());
        } finally {
            if (postMethod != null)
                postMethod.releaseConnection();
+8 −9
Original line number Diff line number Diff line
@@ -23,13 +23,6 @@
 */
package com.owncloud.android.lib.resources.files;

import java.util.ArrayList;

import org.apache.commons.httpclient.HttpStatus;
import org.apache.jackrabbit.webdav.DavConstants;
import org.apache.jackrabbit.webdav.MultiStatus;
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;

import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.network.WebdavEntry;
import com.owncloud.android.lib.common.network.WebdavUtils;
@@ -37,6 +30,13 @@ 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 org.apache.commons.httpclient.HttpStatus;
import org.apache.jackrabbit.webdav.DavConstants;
import org.apache.jackrabbit.webdav.MultiStatus;
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;

import java.util.ArrayList;


/**
 * Remote operation performing the read a file from the ownCloud server.
@@ -106,8 +106,7 @@ public class ReadRemoteFileOperation extends RemoteOperation {

        } catch (Exception e) {
            result = new RemoteOperationResult(e);
            e.printStackTrace();
            Log_OC.e(TAG, "Synchronizing  file " + mRemotePath + ": " + result.getLogMessage(),
            Log_OC.e(TAG, "Read file " + mRemotePath + " failed: " + result.getLogMessage(),
                result.getException());
        } finally {
            if (propfind != null)
+2 −3
Original line number Diff line number Diff line
@@ -95,9 +95,8 @@ public class StoreMetadataOperation extends RemoteOperation {
            }
        } catch (Exception e) {
            result = new RemoteOperationResult(e);
            e.printStackTrace();
            Log_OC.e(TAG, "Storing of metadata for folder " + fileId + " failed: " +
                    result.getLogMessage(), result.getException());
            Log_OC.e(TAG, "Storing of metadata for folder " + fileId + " failed: " + result.getLogMessage(),
                    result.getException());
        } finally {
            if (postMethod != null)
                postMethod.releaseConnection();
+1 −2
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class ToggleEncryptionOperation extends RemoteOperation {

            // remote request
            method.addRequestHeader(OCS_API_HEADER, OCS_API_HEADER_VALUE);
            method.addRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            method.addRequestHeader(CONTENT_TYPE, FORM_URLENCODED);

            int status = client.executeMethod(method, SYNC_READ_TIMEOUT, SYNC_CONNECTION_TIMEOUT);

@@ -94,7 +94,6 @@ public class ToggleEncryptionOperation extends RemoteOperation {
            }
        } catch (Exception e) {
            result = new RemoteOperationResult(e);
            e.printStackTrace();
            Log_OC.e(TAG, "Setting encryption status of " + localId + " failed: " + result.getLogMessage(),
                    result.getException());
        } finally {
Loading