mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Fix credentials in switch accounts
This commit is contained in:
		
							parent
							
								
									782361267d
								
							
						
					
					
						commit
						f3eb0c4431
					
				| @ -117,6 +117,10 @@ public class OwnCloudClient extends HttpClient { | ||||
|         mCredentials.applyTo(this); | ||||
|     } | ||||
| 
 | ||||
|     public void applyCredentials() { | ||||
|         mCredentials.applyTo(this); | ||||
|     } | ||||
| 
 | ||||
|     public int executeHttpMethod (HttpBaseMethod method) throws Exception { | ||||
| 
 | ||||
|         boolean repeatWithFreshCredentials; | ||||
|  | ||||
| @ -145,7 +145,7 @@ public abstract class RemoteOperation<T extends Object> implements Runnable { | ||||
|                 OwnCloudAccount ocAccount = new OwnCloudAccount(mAccount, mContext); | ||||
|                 mClient = OwnCloudClientManagerFactory.getDefaultSingleton(). | ||||
|                         getClientFor(ocAccount, mContext); | ||||
| 
 | ||||
|                 mClient.applyCredentials(); | ||||
|             } else { | ||||
|                 throw new IllegalStateException("Trying to run a remote operation " + | ||||
|                         "asynchronously with no client and no chance to create one (no account)"); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user