mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-30 18:07:38 +00:00 
			
		
		
		
	Change policy name in ownCloudClientManagerFactory
This commit is contained in:
		
							parent
							
								
									015011b6e0
								
							
						
					
					
						commit
						5b3c21ba82
					
				| @ -25,7 +25,7 @@ package com.owncloud.android.lib.common; | |||||||
| 
 | 
 | ||||||
| public class OwnCloudClientManagerFactory { | public class OwnCloudClientManagerFactory { | ||||||
| 
 | 
 | ||||||
|     private static Policy sDefaultPolicy = Policy.ALWAYS_NEW_CLIENT; |     private static Policy sDefaultPolicy = Policy.NEW_CLIENT; | ||||||
|     private static OwnCloudClientManager sDefaultSingleton; |     private static OwnCloudClientManager sDefaultSingleton; | ||||||
|     private static String sUserAgent; |     private static String sUserAgent; | ||||||
| 
 | 
 | ||||||
| @ -35,7 +35,7 @@ public class OwnCloudClientManagerFactory { | |||||||
| 
 | 
 | ||||||
|     private static OwnCloudClientManager newOwnCloudClientManager(Policy policy) { |     private static OwnCloudClientManager newOwnCloudClientManager(Policy policy) { | ||||||
|         switch (policy) { |         switch (policy) { | ||||||
|             case ALWAYS_NEW_CLIENT: |             case NEW_CLIENT: | ||||||
|                 return new SimpleFactoryManager(); |                 return new SimpleFactoryManager(); | ||||||
| 
 | 
 | ||||||
|             case SINGLE_SESSION_PER_ACCOUNT: |             case SINGLE_SESSION_PER_ACCOUNT: | ||||||
| @ -75,11 +75,11 @@ public class OwnCloudClientManagerFactory { | |||||||
|         if (sDefaultSingleton == null) { |         if (sDefaultSingleton == null) { | ||||||
|             return false; |             return false; | ||||||
|         } |         } | ||||||
|         return policy == Policy.ALWAYS_NEW_CLIENT && !(sDefaultSingleton instanceof SimpleFactoryManager); |         return policy == Policy.NEW_CLIENT && !(sDefaultSingleton instanceof SimpleFactoryManager); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public enum Policy { |     public enum Policy { | ||||||
|         ALWAYS_NEW_CLIENT, |         NEW_CLIENT, | ||||||
|         SINGLE_SESSION_PER_ACCOUNT |         SINGLE_SESSION_PER_ACCOUNT | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user