projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f67af8f
)
Fixed comments in PR#246
author
David A. Velasco
<dvelasco@solidgear.es>
Thu, 22 Aug 2013 09:48:57 +0000
(11:48 +0200)
committer
David A. Velasco
<dvelasco@solidgear.es>
Thu, 22 Aug 2013 09:48:57 +0000
(11:48 +0200)
src/com/owncloud/android/authentication/SsoWebViewClient.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java
patch
|
blob
|
blame
|
history
diff --git
a/src/com/owncloud/android/authentication/SsoWebViewClient.java
b/src/com/owncloud/android/authentication/SsoWebViewClient.java
index
ec86667
..
76a5c4a
100644
(file)
--- a/
src/com/owncloud/android/authentication/SsoWebViewClient.java
+++ b/
src/com/owncloud/android/authentication/SsoWebViewClient.java
@@
-74,7
+74,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.d(TAG,
cookies);
+
Log_OC.d(TAG, "Cookies: " +
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() {
@@
-111,6
+111,7
@@
public class SsoWebViewClient extends WebViewClient {
mLastReloadedUrlAtError = failingUrl;
} else {
mLastReloadedUrlAtError = null;
mLastReloadedUrlAtError = failingUrl;
} else {
mLastReloadedUrlAtError = null;
+ super.onReceivedError(view, errorCode, description, failingUrl);
}
}
}
}
diff --git
a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
index
3d2c3de
..
aaca935
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
@@
-28,6
+28,7
@@
import java.util.List;
import java.util.Map;
import java.util.Vector;
import java.util.Map;
import java.util.Vector;
+import org.apache.commons.httpclient.Header;
import org.apache.http.HttpStatus;
import org.apache.jackrabbit.webdav.MultiStatus;
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
import org.apache.http.HttpStatus;
import org.apache.jackrabbit.webdav.MultiStatus;
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
@@
-243,6
+244,10
@@
public class SynchronizeFolderOperation extends RemoteOperation {
} else {
result = new RemoteOperationResult(true, status);
} else {
result = new RemoteOperationResult(true, status);
+ Header hCookie = query.getResponseHeader("Cookie");
+ if (hCookie != null) {
+ Log_OC.d(TAG, "PROPFIND cookie: " + hCookie.getValue());
+ }
}
} else {
result = new RemoteOperationResult(false, status);
}
} else {
result = new RemoteOperationResult(false, status);
diff --git
a/src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java
b/src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java
index
60b032e
..
9ed8a44
100644
(file)
--- a/
src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java
+++ b/
src/com/owncloud/android/ui/dialog/SamlWebViewDialog.java
@@
-57,7
+57,7
@@
public class SamlWebViewDialog extends SherlockDialogFragment {
private static final String ARG_TARGET_URL = "TARGET_URL";
private static final String KEY_WEBVIEW_STATE = "WEBVIEW_STATE";
private static final String ARG_TARGET_URL = "TARGET_URL";
private static final String KEY_WEBVIEW_STATE = "WEBVIEW_STATE";
-
//
private WebView mSsoWebView;
+ private WebView mSsoWebView;
private SsoWebViewClient mWebViewClient;
private String mInitialUrl;
private SsoWebViewClient mWebViewClient;
private String mInitialUrl;
@@
-152,28
+152,28
@@
public class SamlWebViewDialog extends SherlockDialogFragment {
// Inflate layout of the dialog
View rootView = inflater.inflate(R.layout.sso_dialog, container, false); // null parent view because it will go in the dialog layout
// Inflate layout of the dialog
View rootView = inflater.inflate(R.layout.sso_dialog, container, false); // null parent view because it will go in the dialog layout
-
WebView s
soWebView = (WebView) rootView.findViewById(R.id.sso_webview);
+
mS
soWebView = (WebView) rootView.findViewById(R.id.sso_webview);
mWebViewClient.setTargetUrl(mTargetUrl);
mWebViewClient.setTargetUrl(mTargetUrl);
-
s
soWebView.setWebViewClient(mWebViewClient);
+
mS
soWebView.setWebViewClient(mWebViewClient);
if (savedInstanceState == null) {
Log_OC.d(TAG, " initWebView start");
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.removeAllCookie();
if (savedInstanceState == null) {
Log_OC.d(TAG, " initWebView start");
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.removeAllCookie();
-
s
soWebView.loadUrl(mInitialUrl);
+
mS
soWebView.loadUrl(mInitialUrl);
} else {
Log_OC.d(TAG, " restoreWebView start");
} else {
Log_OC.d(TAG, " restoreWebView start");
- WebBackForwardList history =
s
soWebView.restoreState(savedInstanceState.getBundle(KEY_WEBVIEW_STATE));
+ WebBackForwardList history =
mS
soWebView.restoreState(savedInstanceState.getBundle(KEY_WEBVIEW_STATE));
if (history == null) {
Log_OC.e(TAG, "Error restoring WebView state ; back to starting URL");
if (history == null) {
Log_OC.e(TAG, "Error restoring WebView state ; back to starting URL");
-
s
soWebView.loadUrl(mInitialUrl);
+
mS
soWebView.loadUrl(mInitialUrl);
}
}
}
}
- WebSettings webSettings =
s
soWebView.getSettings();
+ WebSettings webSettings =
mS
soWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setLoadWithOverviewMode(false);
webSettings.setJavaScriptEnabled(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setLoadWithOverviewMode(false);
@@
-195,7
+195,7
@@
public class SamlWebViewDialog extends SherlockDialogFragment {
// Save the state of the WebView
Bundle webviewState = new Bundle();
// Save the state of the WebView
Bundle webviewState = new Bundle();
-
((WebView) getDialog().findViewById(R.id.sso_webview))
.saveState(webviewState);
+
mSsoWebView
.saveState(webviewState);
outState.putBundle(KEY_WEBVIEW_STATE, webviewState);
}
outState.putBundle(KEY_WEBVIEW_STATE, webviewState);
}
@@
-203,6
+203,8
@@
public class SamlWebViewDialog extends SherlockDialogFragment {
public void onDestroyView() {
Log_OC.d(TAG, "onDestroyView");
public void onDestroyView() {
Log_OC.d(TAG, "onDestroyView");
+ mSsoWebView.setWebViewClient(null);
+
// Work around bug: http://code.google.com/p/android/issues/detail?id=17423
Dialog dialog = getDialog();
if ((dialog != null)) {
// Work around bug: http://code.google.com/p/android/issues/detail?id=17423
Dialog dialog = getDialog();
if ((dialog != null)) {