Loading src/com/owncloud/android/lib/common/DynamicSessionManager.java +1 −13 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ import android.accounts.OperationCanceledException; import android.content.Context; import com.owncloud.android.lib.common.accounts.AccountUtils; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import java.io.IOException; Loading @@ -29,18 +28,7 @@ public class DynamicSessionManager implements OwnCloudClientManager { throws AccountUtils.AccountNotFoundException, OperationCanceledException, AuthenticatorException, IOException { OwnCloudVersion ownCloudVersion = null; if (account.getSavedAccount() != null) { ownCloudVersion = AccountUtils.getServerVersionForAccount( account.getSavedAccount(), context ); } if (ownCloudVersion != null && ownCloudVersion.isPreemptiveAuthenticationPreferred()) { return mSingleSessionManager.getClientFor(account, context); } else { return mSimpleFactoryManager.getClientFor(account, context); } } @Override Loading src/com/owncloud/android/lib/common/OwnCloudClientFactory.java +2 −10 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import com.owncloud.android.lib.common.accounts.AccountUtils; import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException; import com.owncloud.android.lib.common.network.NetworkUtils; import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import java.io.IOException; import java.security.GeneralSecurityException; Loading Loading @@ -111,11 +110,7 @@ public class OwnCloudClientFactory { AccountTypeUtils.getAuthTokenTypePass(account.type), false); OwnCloudVersion version = AccountUtils.getServerVersionForAccount(account, appContext); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials( username, password, (version != null && version.isPreemptiveAuthenticationPreferred())); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password); client.setCredentials(credentials); } Loading Loading @@ -188,10 +183,7 @@ public class OwnCloudClientFactory { Bundle result = future.getResult(); String password = result.getString(AccountManager.KEY_AUTHTOKEN); OwnCloudVersion version = AccountUtils.getServerVersionForAccount(account, appContext); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials( username, password, (version != null && version.isPreemptiveAuthenticationPreferred())); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password); client.setCredentials(credentials); } Loading src/com/owncloud/android/lib/common/OwnCloudCredentialsFactory.java +1 −5 Original line number Diff line number Diff line Loading @@ -31,11 +31,7 @@ public class OwnCloudCredentialsFactory { private static OwnCloudAnonymousCredentials sAnonymousCredentials; public static OwnCloudCredentials newBasicCredentials(String username, String password) { return new OwnCloudBasicCredentials(username, password); } public static OwnCloudCredentials newBasicCredentials(String username, String password, boolean preemptiveMode) { return new OwnCloudBasicCredentials(username, password, preemptiveMode); return new OwnCloudBasicCredentials(username, password, true); } public static OwnCloudCredentials newBearerCredentials(String authToken) { Loading src/com/owncloud/android/lib/common/accounts/AccountUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -231,8 +231,7 @@ public class AccountUtils { AccountTypeUtils.getAuthTokenTypePass(account.type), false); credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password, version.isPreemptiveAuthenticationPreferred()); credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password); } return credentials; Loading src/com/owncloud/android/lib/resources/status/OwnCloudVersion.java +0 −4 Original line number Diff line number Diff line Loading @@ -172,10 +172,6 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> { return (mVersion >= MINIMUM_VERSION_WITH_NOT_RESHAREABLE_FEDERATED); } public boolean isPreemptiveAuthenticationPreferred() { return (mVersion >= MINIMUM_VERSION_WITH_SESSION_MONITORING); } public boolean isSelfSupported() { return (mVersion >= MINIMUM_VERSION_FOR_SELF_API); } Loading Loading
src/com/owncloud/android/lib/common/DynamicSessionManager.java +1 −13 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ import android.accounts.OperationCanceledException; import android.content.Context; import com.owncloud.android.lib.common.accounts.AccountUtils; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import java.io.IOException; Loading @@ -29,18 +28,7 @@ public class DynamicSessionManager implements OwnCloudClientManager { throws AccountUtils.AccountNotFoundException, OperationCanceledException, AuthenticatorException, IOException { OwnCloudVersion ownCloudVersion = null; if (account.getSavedAccount() != null) { ownCloudVersion = AccountUtils.getServerVersionForAccount( account.getSavedAccount(), context ); } if (ownCloudVersion != null && ownCloudVersion.isPreemptiveAuthenticationPreferred()) { return mSingleSessionManager.getClientFor(account, context); } else { return mSimpleFactoryManager.getClientFor(account, context); } } @Override Loading
src/com/owncloud/android/lib/common/OwnCloudClientFactory.java +2 −10 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import com.owncloud.android.lib.common.accounts.AccountUtils; import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException; import com.owncloud.android.lib.common.network.NetworkUtils; import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import java.io.IOException; import java.security.GeneralSecurityException; Loading Loading @@ -111,11 +110,7 @@ public class OwnCloudClientFactory { AccountTypeUtils.getAuthTokenTypePass(account.type), false); OwnCloudVersion version = AccountUtils.getServerVersionForAccount(account, appContext); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials( username, password, (version != null && version.isPreemptiveAuthenticationPreferred())); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password); client.setCredentials(credentials); } Loading Loading @@ -188,10 +183,7 @@ public class OwnCloudClientFactory { Bundle result = future.getResult(); String password = result.getString(AccountManager.KEY_AUTHTOKEN); OwnCloudVersion version = AccountUtils.getServerVersionForAccount(account, appContext); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials( username, password, (version != null && version.isPreemptiveAuthenticationPreferred())); OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password); client.setCredentials(credentials); } Loading
src/com/owncloud/android/lib/common/OwnCloudCredentialsFactory.java +1 −5 Original line number Diff line number Diff line Loading @@ -31,11 +31,7 @@ public class OwnCloudCredentialsFactory { private static OwnCloudAnonymousCredentials sAnonymousCredentials; public static OwnCloudCredentials newBasicCredentials(String username, String password) { return new OwnCloudBasicCredentials(username, password); } public static OwnCloudCredentials newBasicCredentials(String username, String password, boolean preemptiveMode) { return new OwnCloudBasicCredentials(username, password, preemptiveMode); return new OwnCloudBasicCredentials(username, password, true); } public static OwnCloudCredentials newBearerCredentials(String authToken) { Loading
src/com/owncloud/android/lib/common/accounts/AccountUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -231,8 +231,7 @@ public class AccountUtils { AccountTypeUtils.getAuthTokenTypePass(account.type), false); credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password, version.isPreemptiveAuthenticationPreferred()); credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password); } return credentials; Loading
src/com/owncloud/android/lib/resources/status/OwnCloudVersion.java +0 −4 Original line number Diff line number Diff line Loading @@ -172,10 +172,6 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> { return (mVersion >= MINIMUM_VERSION_WITH_NOT_RESHAREABLE_FEDERATED); } public boolean isPreemptiveAuthenticationPreferred() { return (mVersion >= MINIMUM_VERSION_WITH_SESSION_MONITORING); } public boolean isSelfSupported() { return (mVersion >= MINIMUM_VERSION_FOR_SELF_API); } Loading