-
Notifications
You must be signed in to change notification settings - Fork 148
Conversation
0b5ea8e
to
7274358
Compare
b736484
to
cbbdc2c
Compare
cbbdc2c
to
868079e
Compare
01d5993
to
7529026
Compare
f890d8f
to
4cbfc4a
Compare
build.gradle
Outdated
api project(':dav4android') | ||
|
||
// Used for network and database debuging | ||
debugApi 'com.facebook.stetho:stetho:1.5.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete Stetho, with Android Studio network profiler is enough
sample_client/AndroidManifest.xml
Outdated
android:screenOrientation="portrait" | ||
> | ||
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher"> | ||
<activity android:name="MainActivity" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent this properly
import com.owncloud.android.lib.common.http.HttpClient; | ||
import com.owncloud.android.lib.common.http.HttpConstants; | ||
import com.owncloud.android.lib.common.http.methods.HttpBaseMethod; | ||
import com.owncloud.android.lib.common.http.methods.webdav.CopyMethod; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import not used
import java.util.List; | ||
|
||
import at.bitfire.dav4android.exception.HttpException; | ||
import at.bitfire.dav4android.exception.RedirectException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither this
PARAM_SINGLE_COOKIE_HEADER, // to avoid problems with some web servers | ||
PARAM_SINGLE_COOKIE_HEADER_VALUE | ||
); | ||
//TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if this is implemented somewhere else and delete it if so
@@ -24,16 +24,15 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright year
@@ -31,21 +31,21 @@ | |||
import com.owncloud.android.lib.common.authentication.OwnCloudBasicCredentials; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, including authors
@@ -26,19 +26,22 @@ | |||
import com.owncloud.android.lib.common.authentication.OwnCloudBasicCredentials; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
OwnCloudCredentials oldCredentials = switchClientCredentials(oauthCredentials); | ||
|
||
client.executeMethod(postMethod); | ||
final OwnCloudCredentials oauthCredentials = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fits properly in the same line
return mCall.isCanceled(); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much space here
@@ -41,12 +41,6 @@ | |||
import javax.net.ssl.TrustManagerFactory; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright year in all test classes
get = new GetMethod(client.getBaseUri() + OCS_ROUTE); | ||
get.addRequestHeader(OCS_API_HEADER, OCS_API_HEADER_VALUE); | ||
status = client.executeMethod(get); | ||
final Request request = new Request.Builder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This request is not being used
|
||
import java.net.URL; | ||
|
||
import okhttp3.Request; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed since due to next comment
import com.owncloud.android.lib.common.OwnCloudClient; | ||
import com.owncloud.android.lib.common.http.HttpConstants; | ||
import com.owncloud.android.lib.common.http.methods.nonwebdav.GetMethod; | ||
import com.owncloud.android.lib.common.network.WebdavUtils; | ||
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; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much space here
result = new RemoteOperationResult(false, get); | ||
client.exhaustResponse(get.getResponseBodyAsStream()); | ||
result = new RemoteOperationResult<>(getMethod); | ||
client.exhaustResponse(getMethod.getResponseAsStream()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getResponseAsStream => getResponseBodyAsStream
@@ -1,140 +1,138 @@ | |||
/* ownCloud Android Library is available under MIT license | |||
* Copyright (C) 2016 ownCloud GmbH. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this year
@@ -87,39 +92,38 @@ protected RemoteOperationResult run(OwnCloudClient client) { | |||
} | |||
|
|||
} else { | |||
result = new RemoteOperationResult(ResultCode.INVALID_CHARACTER_IN_NAME); | |||
result = new RemoteOperationResult<>(ResultCode.INVALID_CHARACTER_IN_NAME); | |||
} | |||
|
|||
return result; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much space here
* @throws org.apache.jackrabbit.webdav.DavException If the status code is other than MultiStatus or if obtaining | ||
* the response XML document fails | ||
*/ | ||
private RemoteOperationResult processPartialError(CopyMethod copyMethod) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look at this
@@ -27,25 +27,21 @@ | |||
import android.util.Log; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update copyright year
@@ -1,29 +1,16 @@ | |||
/* ownCloud Android Library is available under MIT license |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include this again
f4aba99
to
4d2d584
Compare
mModificationTimestamp = (d != null) ? d.getTime() : 0; | ||
} else { | ||
Log_OC.e(TAG, "Could not read modification time from response downloading " + mRemotePath); | ||
} | ||
|
||
mEtag = WebdavUtils.getEtagFromResponse(mGet); | ||
// TODO mEtag = WebdavUtils.getEtagFromResponse(mGet); | ||
if (mEtag.length() == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It always will be zero. Don't you nedd implement TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will implement the TODO
LGTM |
b0b83ce
to
8e30a3b
Compare
add OCAccount
ab2cd1a
to
eaa645a
Compare
Implements #51
Needs owncloud/android#2236