X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/2c04c31d90ae8b2324bcf120eb925d4e872e53ac..be51b2c4aa8fff92f73bd0846ee31a69cc36c528:/src/com/owncloud/android/operations/ConnectionCheckOperation.java?ds=inline diff --git a/src/com/owncloud/android/operations/ConnectionCheckOperation.java b/src/com/owncloud/android/operations/ConnectionCheckOperation.java index cd04f6a8..d83de76b 100644 --- a/src/com/owncloud/android/operations/ConnectionCheckOperation.java +++ b/src/com/owncloud/android/operations/ConnectionCheckOperation.java @@ -1,9 +1,9 @@ /* ownCloud Android client application - * Copyright (C) 2012 Bartek Przybylski + * Copyright (C) 2012-2013 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -24,6 +24,7 @@ import org.json.JSONException; import org.json.JSONObject; import com.owncloud.android.AccountUtils; +import com.owncloud.android.Log_OC; import com.owncloud.android.utils.OwnCloudVersion; import eu.alefzero.webdav.WebdavClient; @@ -37,7 +38,7 @@ public class ConnectionCheckOperation extends RemoteOperation { /** Maximum time to wait for a response from the server when the connection is being tested, in MILLISECONDs. */ public static final int TRY_CONNECTION_TIMEOUT = 5000; - private static final String TAG = ConnectionCheckOperation.class.getCanonicalName(); + private static final String TAG = ConnectionCheckOperation.class.getSimpleName(); private String mUrl; private RemoteOperationResult mLatestResult; @@ -96,13 +97,13 @@ public class ConnectionCheckOperation extends RemoteOperation { } if (mLatestResult.isSuccess()) { - Log.i(TAG, "Connection check at " + urlSt + ": " + mLatestResult.getLogMessage()); + Log_OC.i(TAG, "Connection check at " + urlSt + ": " + mLatestResult.getLogMessage()); } else if (mLatestResult.getException() != null) { - Log.e(TAG, "Connection check at " + urlSt + ": " + mLatestResult.getLogMessage(), mLatestResult.getException()); + Log_OC.e(TAG, "Connection check at " + urlSt + ": " + mLatestResult.getLogMessage(), mLatestResult.getException()); } else { - Log.e(TAG, "Connection check at " + urlSt + ": " + mLatestResult.getLogMessage()); + Log_OC.e(TAG, "Connection check at " + urlSt + ": " + mLatestResult.getLogMessage()); } return retval; @@ -127,7 +128,7 @@ public class ConnectionCheckOperation extends RemoteOperation { client.setBaseUri(Uri.parse("https://" + mUrl + AccountUtils.STATUS_PATH)); boolean httpsSuccess = tryConnection(client, "https://" + mUrl + AccountUtils.STATUS_PATH); if (!httpsSuccess && !mLatestResult.isSslRecoverableException()) { - Log.d(TAG, "establishing secure connection failed, trying non secure connection"); + Log_OC.d(TAG, "establishing secure connection failed, trying non secure connection"); client.setBaseUri(Uri.parse("http://" + mUrl + AccountUtils.STATUS_PATH)); tryConnection(client, "http://" + mUrl + AccountUtils.STATUS_PATH); }