X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/63a3522ab7c8940ccc48be09e2247f86cbf60598..ebd6888ed1c7fd1c2436b491e0fbfb185f5ab5c4:/src/com/owncloud/android/files/services/FileUploader.java diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index 2f66e305..6b12fa51 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -579,7 +579,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe mUploadClient.exhaustResponse(propfind.getResponseBodyAsStream()); } - result = new RemoteOperationResult(isMultiStatus, status); + result = new RemoteOperationResult(isMultiStatus, status, propfind.getResponseHeaders()); Log_OC.i(TAG, "Update: synchronizing properties for uploaded " + mCurrentUpload.getRemotePath() + ": " + result.getLogMessage()); @@ -791,10 +791,12 @@ public class FileUploader extends Service implements OnDatatransferProgressListe Notification finalNotification = new Notification(R.drawable.icon, getString(R.string.uploader_upload_failed_ticker), System.currentTimeMillis()); finalNotification.flags |= Notification.FLAG_AUTO_CANCEL; - if (uploadResult.getCode() == ResultCode.UNAUTHORIZED) { + if (uploadResult.getCode() == ResultCode.UNAUTHORIZED || + (uploadResult.isTemporalRedirection() && AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mUploadClient.getAuthTokenType()))) { // let the user update credentials with one click Intent updateAccountCredentials = new Intent(this, AuthenticatorActivity.class); updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACCOUNT, upload.getAccount()); + updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ENFORCED_UPDATE, true); updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACTION, AuthenticatorActivity.ACTION_UPDATE_TOKEN); updateAccountCredentials.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); updateAccountCredentials.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);