Fixed redirection to login view from failed notifications when click on
authorDavid A. Velasco <dvelasco@solidgear.es>
Wed, 25 Jun 2014 15:04:02 +0000 (17:04 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Wed, 25 Jun 2014 15:04:02 +0000 (17:04 +0200)
owncloud-android-library
src/com/owncloud/android/files/services/FileDownloader.java
src/com/owncloud/android/files/services/FileUploader.java

index a57be36..4c8f31d 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a57be369259bbfb3741a649a8d585fc8de6ac669
+Subproject commit 4c8f31df2fb63dbb29be6eacfb8767bc73a34312
index 478a85a..2e34a8b 100644 (file)
@@ -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;
             
index 2653fbf..7a5f8de 100644 (file)
@@ -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;