X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/5be4bf17e11bfae134f24bbc8501b618304467b4..f1f8c749d1c98c569ab2b21f497a997cfcde1129:/src/com/owncloud/android/operations/ExistenceCheckOperation.java diff --git a/src/com/owncloud/android/operations/ExistenceCheckOperation.java b/src/com/owncloud/android/operations/ExistenceCheckOperation.java index 506636f7..d678ac34 100644 --- a/src/com/owncloud/android/operations/ExistenceCheckOperation.java +++ b/src/com/owncloud/android/operations/ExistenceCheckOperation.java @@ -41,20 +41,6 @@ public class ExistenceCheckOperation extends RemoteOperation { private String mPath; private Context mContext; private boolean mSuccessIfAbsent; - private String mAccessToken; - - - /** - * Simple constructor. Success when the path in the server exists. - * - * @param path Path to append to the URL owned by the client instance. - * @param context Android application context. - * @param accessToken Access token for Bearer Authentication -> TODO: move to other place - */ - public ExistenceCheckOperation(String path, Context context, String accessToken) { - this(path, context, false); - mAccessToken = accessToken; - } /** @@ -80,8 +66,6 @@ public class ExistenceCheckOperation extends RemoteOperation { HeadMethod head = null; try { head = new HeadMethod(client.getBaseUri() + mPath); - head.addRequestHeader("Authorization", "Bearer " + mAccessToken); // TODO put in some general place - int status = client.executeMethod(head, TIMEOUT, TIMEOUT); client.exhaustResponse(head.getResponseBodyAsStream()); boolean success = (status == HttpStatus.SC_OK && !mSuccessIfAbsent) || (status == HttpStatus.SC_NOT_FOUND && mSuccessIfAbsent); @@ -106,4 +90,5 @@ public class ExistenceCheckOperation extends RemoteOperation { && cm.getActiveNetworkInfo().isConnectedOrConnecting(); } + }