import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
+import com.owncloud.android.lib.common.network.NetworkUtils;
+import com.owncloud.android.lib.common.utils.Log_OC;
+
import android.content.Context;
import android.graphics.Bitmap;
import android.net.http.SslCertificate;
import android.webkit.WebView;
import android.webkit.WebViewClient;
-import com.owncloud.android.lib.common.network.NetworkUtils;
-import com.owncloud.android.utils.Log_OC;
-
/**
* Custom {@link WebViewClient} client aimed to catch the end of a single-sign-on process
public void onPageFinished (WebView view, String url) {
Log_OC.d(TAG, "onPageFinished : " + url);
mLastReloadedUrlAtError = null;
+ CookieManager cookieManager = CookieManager.getInstance();
+ final String cookies = cookieManager.getCookie(url);
+ Log_OC.d(TAG, "Cookies: " + cookies);
if (url.startsWith(mTargetUrl)) {
view.setVisibility(View.GONE);
- CookieManager cookieManager = CookieManager.getInstance();
- final String cookies = cookieManager.getCookie(url);
- Log_OC.d(TAG, "Cookies: " + cookies);
if (mListenerHandler != null && mListenerRef != null) {
// this is good idea because onPageFinished is not running in the UI thread
mListenerHandler.post(new Runnable() {