Skip to content

Commit a48b4d5

Browse files
Caleb Meredithfacebook-github-bot
Caleb Meredith
authored andcommitted
Add Sonar support to Oculus Twilight Android
Reviewed By: alex1kom Differential Revision: D7177071 fbshipit-source-id: 685d40e564d391d18592cedfcc12d8ac743a5331
1 parent f1316ca commit a48b4d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,18 @@ public static OkHttpClient createClient() {
5454
if (sFactory != null) {
5555
return sFactory.createNewNetworkModuleClient();
5656
}
57+
return createClientBuilder().build();
58+
}
5759

60+
public static OkHttpClient.Builder createClientBuilder() {
5861
// No timeouts by default
5962
OkHttpClient.Builder client = new OkHttpClient.Builder()
6063
.connectTimeout(0, TimeUnit.MILLISECONDS)
6164
.readTimeout(0, TimeUnit.MILLISECONDS)
6265
.writeTimeout(0, TimeUnit.MILLISECONDS)
6366
.cookieJar(new ReactCookieJarContainer());
6467

65-
return enableTls12OnPreLollipop(client).build();
68+
return enableTls12OnPreLollipop(client);
6669
}
6770

6871
/*

0 commit comments

Comments
 (0)