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

prevent acumulating cookies on account change

This commit is contained in:
Christian Schabesberger 2020-10-19 14:55:39 +02:00 committed by Abel García de Prada
parent 6089046dd2
commit fbb47aea98

View File

@ -111,6 +111,12 @@ public class SingleSessionManager {
account.getBaseUri(),
context.getApplicationContext(),
true); // TODO remove dependency on OwnCloudClientFactory
//the next two lines are a hack because okHttpclient is used as a singleton instead of being an
//injected instance that can be deleted when required
client.clearCookies();
client.clearCredentials();
client.setAccount(account);
HttpClient.setContext(context);