From 78a2ba586886398cd7593dea8ad92a5f8f843106 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Wed, 25 Jun 2014 17:04:02 +0200 Subject: [PATCH] Fixed redirection to login view from failed notifications when click on --- owncloud-android-library | 2 +- src/com/owncloud/android/files/services/FileDownloader.java | 7 ++++--- src/com/owncloud/android/files/services/FileUploader.java | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/owncloud-android-library b/owncloud-android-library index a57be369..4c8f31df 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit a57be369259bbfb3741a649a8d585fc8de6ac669 +Subproject commit 4c8f31df2fb63dbb29be6eacfb8767bc73a34312 diff --git a/src/com/owncloud/android/files/services/FileDownloader.java b/src/com/owncloud/android/files/services/FileDownloader.java index 478a85aa..2e34a8b6 100644 --- a/src/com/owncloud/android/files/services/FileDownloader.java +++ b/src/com/owncloud/android/files/services/FileDownloader.java @@ -470,9 +470,10 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis int tickerId = (downloadResult.isSuccess()) ? R.string.downloader_download_succeeded_ticker : R.string.downloader_download_failed_ticker; - boolean needsToUpdateCredentials = (downloadResult.getCode() == ResultCode.UNAUTHORIZED || - (downloadResult.isIdPRedirection() - && mDownloadClient.getCredentials() == null)); + boolean needsToUpdateCredentials = ( + downloadResult.getCode() == ResultCode.UNAUTHORIZED || + downloadResult.isIdPRedirection() + ); tickerId = (needsToUpdateCredentials) ? R.string.downloader_download_failed_credentials_error : tickerId; diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index 2653fbf4..7a5f8de5 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -741,9 +741,10 @@ public class FileUploader extends Service implements OnDatatransferProgressListe String content = null; // check credentials error - boolean needsToUpdateCredentials = (uploadResult.getCode() == ResultCode.UNAUTHORIZED || - (uploadResult.isIdPRedirection() && - mUploadClient.getCredentials() == null)); + boolean needsToUpdateCredentials = ( + uploadResult.getCode() == ResultCode.UNAUTHORIZED || + uploadResult.isIdPRedirection() + ); tickerId = (needsToUpdateCredentials) ? R.string.uploader_upload_failed_credentials_error : tickerId; -- 2.11.0