projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/saml_based_federated_single_sign_on' into saml_b...
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
authentication
/
SsoWebViewClient.java
diff --git
a/src/com/owncloud/android/authentication/SsoWebViewClient.java
b/src/com/owncloud/android/authentication/SsoWebViewClient.java
index
475b88d
..
ff39f63
100644
(file)
--- a/
src/com/owncloud/android/authentication/SsoWebViewClient.java
+++ b/
src/com/owncloud/android/authentication/SsoWebViewClient.java
@@
-21,12
+21,12
@@
import java.lang.ref.WeakReference;
import android.graphics.Bitmap;
import android.os.Handler;
import android.graphics.Bitmap;
import android.os.Handler;
+import android.os.Message;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
-import com.owncloud.android.Log_OC;
/**
* Custom {@link WebViewClient} client aimed to catch the end of a single-sign-on process
/**
* Custom {@link WebViewClient} client aimed to catch the end of a single-sign-on process
@@
-39,7
+39,7
@@
import com.owncloud.android.Log_OC;
*/
public class SsoWebViewClient extends WebViewClient {
*/
public class SsoWebViewClient extends WebViewClient {
- private static final String TAG = SsoWebViewClient.class.getSimpleName();
+
//
private static final String TAG = SsoWebViewClient.class.getSimpleName();
public interface SsoWebViewClientListener {
public void onSsoFinished(String sessionCookie);
public interface SsoWebViewClientListener {
public void onSsoFinished(String sessionCookie);
@@
-70,6
+70,7
@@
public class SsoWebViewClient extends WebViewClient {
view.setVisibility(View.GONE);
CookieManager cookieManager = CookieManager.getInstance();
final String cookies = cookieManager.getCookie(url);
view.setVisibility(View.GONE);
CookieManager cookieManager = CookieManager.getInstance();
final String cookies = cookieManager.getCookie(url);
+ //Log_OC.e(TAG, cookies);
if (mListenerHandler != null && mListenerRef != null) {
// this is good idea because onPageStarted is not running in the UI thread
mListenerHandler.post(new Runnable() {
if (mListenerHandler != null && mListenerRef != null) {
// this is good idea because onPageStarted is not running in the UI thread
mListenerHandler.post(new Runnable() {
@@
-86,6
+87,15
@@
public class SsoWebViewClient extends WebViewClient {
}
@Override
}
@Override
+ public void onFormResubmission (WebView view, Message dontResend, Message resend) {
+ //Log_OC.e(TAG, "onFormResubMission ");
+
+ // necessary to grant reload of last page when device orientation is changed after sending a form
+ resend.sendToTarget();
+ }
+
+ /*
+ @Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
//view.loadUrl(url);
return false;
public boolean shouldOverrideUrlLoading(WebView view, String url) {
//view.loadUrl(url);
return false;
@@
-96,8
+106,6
@@
public class SsoWebViewClient extends WebViewClient {
Log_OC.e(TAG, "onReceivedError : " + failingUrl);
}
Log_OC.e(TAG, "onReceivedError : " + failingUrl);
}
- /*
-
@Override
public void doUpdateVisitedHistory (WebView view, String url, boolean isReload) {
Log_OC.e(TAG, "doUpdateVisitedHistory : " + url);
@Override
public void doUpdateVisitedHistory (WebView view, String url, boolean isReload) {
Log_OC.e(TAG, "doUpdateVisitedHistory : " + url);
@@
-130,12
+138,6
@@
public class SsoWebViewClient extends WebViewClient {
}
@Override
}
@Override
- public void onFormResubmission (WebView view, Message dontResend, Message resend) {
- Log_OC.e(TAG, "onFormResubMission ");
- super.onFormResubmission(view, dontResend, resend);
- }
-
- @Override
public void onReceivedLoginRequest (WebView view, String realm, String account, String args) {
Log_OC.e(TAG, "onReceivedLoginRequest : " + realm + ", " + account + ", " + args);
}
public void onReceivedLoginRequest (WebView view, String realm, String account, String args) {
Log_OC.e(TAG, "onReceivedLoginRequest : " + realm + ", " + account + ", " + args);
}
@@
-155,6
+157,6
@@
public class SsoWebViewClient extends WebViewClient {
Log_OC.e(TAG, "shouldOverrideKeyEvent : " + event);
return false;
}
Log_OC.e(TAG, "shouldOverrideKeyEvent : " + event);
return false;
}
-
*/
*/
+
}
}