Fixed condition to determine expiration of SAML SSO
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileDownloader.java
index 0afcf6a..0ae09d7 100644 (file)
@@ -465,7 +465,7 @@ 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 ||
-                                                ((downloadResult.isTemporalRedirection() || downloadResult.isIdPRedirection())
+                                                (downloadResult.isTemporalRedirection() && downloadResult.isIdPRedirection()
                                                         && AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mDownloadClient.getAuthTokenType())));
             if (needsToUpdateCredentials) {
                 // let the user update credentials with one click