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

Unverified Commit 4bf1d42a authored by tobiasKaminsky's avatar tobiasKaminsky
Browse files

changes due to CR

parent 038ea2fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ public class LockFileOperation extends RemoteOperation {
    private static final int SYNC_READ_TIMEOUT = 40000;
    private static final int SYNC_CONNECTION_TIMEOUT = 5000;
    private static final String LOCK_FILE_URL = "/ocs/v2.php/apps/end_to_end_encryption/api/v1/lock/";
    private static final String TOKEN = "token";

    private String localId;
    private String token;
@@ -77,7 +78,7 @@ public class LockFileOperation extends RemoteOperation {
            postMethod = new PostMethod(client.getBaseUri() + LOCK_FILE_URL + localId + JSON_FORMAT);

            if (!token.isEmpty()) {
                postMethod.setParameter("token", token);
                postMethod.setParameter(TOKEN, token);
            }

            // remote request
+2 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ public class StoreMetadataOperation extends RemoteOperation {
    private static final int SYNC_READ_TIMEOUT = 40000;
    private static final int SYNC_CONNECTION_TIMEOUT = 5000;
    private static final String METADATA_URL = "/ocs/v2.php/apps/end_to_end_encryption/api/v1/meta-data/";
    private static final String METADATA = "metaData";

    // JSON node names
    private static final String NODE_OCS = "ocs";
@@ -73,7 +74,7 @@ public class StoreMetadataOperation extends RemoteOperation {
            // remote request
            postMethod = new PostMethod(client.getBaseUri() + METADATA_URL + fileId + JSON_FORMAT);
            postMethod.addRequestHeader(OCS_API_HEADER, OCS_API_HEADER_VALUE);
            postMethod.setParameter("metaData", encryptedMetadataJson);
            postMethod.setParameter(METADATA, encryptedMetadataJson);

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