1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Fix log with old server version

This commit is contained in:
Abel García de Prada 2019-12-20 13:25:00 +01:00 committed by davigonz
parent 52463707c7
commit 03e30ae698

View File

@ -381,11 +381,8 @@ public class OwnCloudClient extends HttpClient {
* cannot be invalidated with the given arguments. * cannot be invalidated with the given arguments.
*/ */
private boolean shouldInvalidateAccountCredentials(int httpStatusCode) { private boolean shouldInvalidateAccountCredentials(int httpStatusCode) {
boolean isServerVersionSupported = AccountUtils.getServerVersionForAccount(getAccount().getSavedAccount(),
getContext()).isServerVersionSupported();
boolean shouldInvalidateAccountCredentials = boolean shouldInvalidateAccountCredentials =
(httpStatusCode == HttpConstants.HTTP_UNAUTHORIZED || !isServerVersionSupported); (httpStatusCode == HttpConstants.HTTP_UNAUTHORIZED);
shouldInvalidateAccountCredentials &= (mCredentials != null && // real credentials shouldInvalidateAccountCredentials &= (mCredentials != null && // real credentials
!(mCredentials instanceof OwnCloudCredentialsFactory.OwnCloudAnonymousCredentials)); !(mCredentials instanceof OwnCloudCredentialsFactory.OwnCloudAnonymousCredentials));