Loading src/com/owncloud/android/lib/common/operations/RemoteOperation.java +3 −0 Original line number Diff line number Diff line Loading @@ -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; Loading src/com/owncloud/android/lib/resources/files/LockFileOperation.java +2 −4 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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(); Loading src/com/owncloud/android/lib/resources/files/ReadRemoteFileOperation.java +8 −9 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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. Loading Loading @@ -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) Loading src/com/owncloud/android/lib/resources/files/StoreMetadataOperation.java +2 −3 Original line number Diff line number Diff line Loading @@ -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(); Loading src/com/owncloud/android/lib/resources/files/ToggleEncryptionOperation.java +1 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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 Loading
src/com/owncloud/android/lib/common/operations/RemoteOperation.java +3 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
src/com/owncloud/android/lib/resources/files/LockFileOperation.java +2 −4 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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(); Loading
src/com/owncloud/android/lib/resources/files/ReadRemoteFileOperation.java +8 −9 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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. Loading Loading @@ -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) Loading
src/com/owncloud/android/lib/resources/files/StoreMetadataOperation.java +2 −3 Original line number Diff line number Diff line Loading @@ -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(); Loading
src/com/owncloud/android/lib/resources/files/ToggleEncryptionOperation.java +1 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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