1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 07:56:19 +00:00

Change policy name in ownCloudClientManagerFactory

This commit is contained in:
davigonz 2020-02-04 15:32:53 +01:00
parent 015011b6e0
commit 5b3c21ba82

View File

@ -25,7 +25,7 @@ package com.owncloud.android.lib.common;
public class OwnCloudClientManagerFactory {
private static Policy sDefaultPolicy = Policy.ALWAYS_NEW_CLIENT;
private static Policy sDefaultPolicy = Policy.NEW_CLIENT;
private static OwnCloudClientManager sDefaultSingleton;
private static String sUserAgent;
@ -35,7 +35,7 @@ public class OwnCloudClientManagerFactory {
private static OwnCloudClientManager newOwnCloudClientManager(Policy policy) {
switch (policy) {
case ALWAYS_NEW_CLIENT:
case NEW_CLIENT:
return new SimpleFactoryManager();
case SINGLE_SESSION_PER_ACCOUNT:
@ -75,11 +75,11 @@ public class OwnCloudClientManagerFactory {
if (sDefaultSingleton == null) {
return false;
}
return policy == Policy.ALWAYS_NEW_CLIENT && !(sDefaultSingleton instanceof SimpleFactoryManager);
return policy == Policy.NEW_CLIENT && !(sDefaultSingleton instanceof SimpleFactoryManager);
}
public enum Policy {
ALWAYS_NEW_CLIENT,
NEW_CLIENT,
SINGLE_SESSION_PER_ACCOUNT
}
}