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:
da77406
)
OC-1079: Use isIdPRedirection
author
masensio
<masensio@solidgear.es>
Tue, 27 Aug 2013 10:32:52 +0000
(12:32 +0200)
committer
masensio
<masensio@solidgear.es>
Tue, 27 Aug 2013 10:32:52 +0000
(12:32 +0200)
src/com/owncloud/android/files/services/FileDownloader.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/files/services/FileUploader.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/RemoteOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/syncadapter/FileSyncAdapter.java
patch
|
blob
|
blame
|
history
diff --git
a/src/com/owncloud/android/files/services/FileDownloader.java
b/src/com/owncloud/android/files/services/FileDownloader.java
index
0ae09d7
..
e07a17b
100644
(file)
--- a/
src/com/owncloud/android/files/services/FileDownloader.java
+++ b/
src/com/owncloud/android/files/services/FileDownloader.java
@@
-465,7
+465,8
@@
public class FileDownloader extends Service implements OnDatatransferProgressLis
Notification finalNotification = new Notification(R.drawable.icon, getString(tickerId), System.currentTimeMillis());
finalNotification.flags |= Notification.FLAG_AUTO_CANCEL;
boolean needsToUpdateCredentials = (downloadResult.getCode() == ResultCode.UNAUTHORIZED ||
Notification finalNotification = new Notification(R.drawable.icon, getString(tickerId), System.currentTimeMillis());
finalNotification.flags |= Notification.FLAG_AUTO_CANCEL;
boolean needsToUpdateCredentials = (downloadResult.getCode() == ResultCode.UNAUTHORIZED ||
- (downloadResult.isTemporalRedirection() && downloadResult.isIdPRedirection()
+ // (downloadResult.isTemporalRedirection() && downloadResult.isIdPRedirection()
+ (downloadResult.isIdPRedirection()
&& AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mDownloadClient.getAuthTokenType())));
if (needsToUpdateCredentials) {
// let the user update credentials with one click
&& AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mDownloadClient.getAuthTokenType())));
if (needsToUpdateCredentials) {
// let the user update credentials with one click
diff --git
a/src/com/owncloud/android/files/services/FileUploader.java
b/src/com/owncloud/android/files/services/FileUploader.java
index
2356c43
..
a02e74a
100644
(file)
--- a/
src/com/owncloud/android/files/services/FileUploader.java
+++ b/
src/com/owncloud/android/files/services/FileUploader.java
@@
-794,7
+794,8
@@
public class FileUploader extends Service implements OnDatatransferProgressListe
String content = null;
boolean needsToUpdateCredentials = (uploadResult.getCode() == ResultCode.UNAUTHORIZED ||
String content = null;
boolean needsToUpdateCredentials = (uploadResult.getCode() == ResultCode.UNAUTHORIZED ||
- (uploadResult.isTemporalRedirection() && uploadResult.isIdPRedirection() &&
+ //(uploadResult.isTemporalRedirection() && uploadResult.isIdPRedirection() &&
+ (uploadResult.isIdPRedirection() &&
AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mUploadClient.getAuthTokenType())));
if (needsToUpdateCredentials) {
// let the user update credentials with one click
AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mUploadClient.getAuthTokenType())));
if (needsToUpdateCredentials) {
// let the user update credentials with one click
diff --git
a/src/com/owncloud/android/operations/RemoteOperation.java
b/src/com/owncloud/android/operations/RemoteOperation.java
index
9306e35
..
4d7bcee
100644
(file)
--- a/
src/com/owncloud/android/operations/RemoteOperation.java
+++ b/
src/com/owncloud/android/operations/RemoteOperation.java
@@
-243,7
+243,8
@@
public abstract class RemoteOperation implements Runnable {
repeat = false;
if (mCallerActivity != null && mAccount != null && mContext != null && !result.isSuccess() &&
repeat = false;
if (mCallerActivity != null && mAccount != null && mContext != null && !result.isSuccess() &&
- (result.getCode() == ResultCode.UNAUTHORIZED || (result.isTemporalRedirection() && result.isIdPRedirection()))) {
+// (result.getCode() == ResultCode.UNAUTHORIZED || (result.isTemporalRedirection() && result.isIdPRedirection()))) {
+ (result.getCode() == ResultCode.UNAUTHORIZED || result.isIdPRedirection())) {
/// possible fail due to lack of authorization in an operation performed in foreground
Credentials cred = mClient.getCredentials();
String ssoSessionCookie = mClient.getSsoSessionCookie();
/// possible fail due to lack of authorization in an operation performed in foreground
Credentials cred = mClient.getCredentials();
String ssoSessionCookie = mClient.getSsoSessionCookie();
diff --git
a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java
b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java
index
0ae6d77
..
49f88f9
100644
(file)
--- a/
src/com/owncloud/android/syncadapter/FileSyncAdapter.java
+++ b/
src/com/owncloud/android/syncadapter/FileSyncAdapter.java
@@
-225,7
+225,8
@@
public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
} else {
if (result.getCode() == RemoteOperationResult.ResultCode.UNAUTHORIZED ||
} else {
if (result.getCode() == RemoteOperationResult.ResultCode.UNAUTHORIZED ||
- (result.isTemporalRedirection() && result.isIdPRedirection() &&
+ // (result.isTemporalRedirection() && result.isIdPRedirection() &&
+ ( result.isIdPRedirection() &&
AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(getClient().getAuthTokenType()))) {
mSyncResult.stats.numAuthExceptions++;
AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(getClient().getAuthTokenType()))) {
mSyncResult.stats.numAuthExceptions++;
@@
-309,7
+310,8
@@
public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
notification.flags |= Notification.FLAG_AUTO_CANCEL;
boolean needsToUpdateCredentials = (mLastFailedResult != null &&
( mLastFailedResult.getCode() == ResultCode.UNAUTHORIZED ||
notification.flags |= Notification.FLAG_AUTO_CANCEL;
boolean needsToUpdateCredentials = (mLastFailedResult != null &&
( mLastFailedResult.getCode() == ResultCode.UNAUTHORIZED ||
- (mLastFailedResult.isTemporalRedirection() && mLastFailedResult.isIdPRedirection() &&
+ // (mLastFailedResult.isTemporalRedirection() && mLastFailedResult.isIdPRedirection() &&
+ ( mLastFailedResult.isIdPRedirection() &&
AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(getClient().getAuthTokenType()))
)
);
AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(getClient().getAuthTokenType()))
)
);