Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 0e82f98

Browse files
committed
remove OwnCloudClient factory
1 parent 0d94058 commit 0e82f98

File tree

2 files changed

+9
-51
lines changed

2 files changed

+9
-51
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/OwnCloudClientFactory.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/SingleSessionManager.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ public static void setUserAgent(String userAgent) {
6868
sUserAgent = userAgent;
6969
}
7070

71+
private static OwnCloudClient createOwnCloudClient(Uri uri, Context context, boolean followRedirects) {
72+
OwnCloudClient client = new OwnCloudClient(uri);
73+
client.setFollowRedirects(followRedirects);
74+
HttpClient.setContext(context);
75+
76+
return client;
77+
}
78+
7179
public OwnCloudClient getClientFor(OwnCloudAccount account, Context context) throws OperationCanceledException,
7280
AuthenticatorException, IOException {
7381

@@ -104,7 +112,7 @@ public OwnCloudClient getClientFor(OwnCloudAccount account, Context context) thr
104112

105113
if (client == null) {
106114
// no client to reuse - create a new one
107-
client = OwnCloudClientFactory.createOwnCloudClient(
115+
client = createOwnCloudClient(
108116
account.getBaseUri(),
109117
context.getApplicationContext(),
110118
true); // TODO remove dependency on OwnCloudClientFactory

0 commit comments

Comments
 (0)