mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-28 05:35:44 +00:00
Use LibSignalChatConnection for Authenticated Socket based on Remote Config
This commit is contained in:
committed by
Greyson Parrelli
parent
9389f373c6
commit
080b79c893
@@ -408,12 +408,23 @@ public class ApplicationDependencyProvider implements AppDependencies.Provider {
|
||||
return new WebSocketFactory() {
|
||||
@Override
|
||||
public WebSocketConnection createWebSocket() {
|
||||
return new OkHttpWebSocketConnection("normal",
|
||||
signalServiceConfigurationSupplier.get(),
|
||||
Optional.of(new DynamicCredentialsProvider()),
|
||||
BuildConfig.SIGNAL_AGENT,
|
||||
healthMonitor,
|
||||
Stories.isFeatureEnabled());
|
||||
if (RemoteConfig.libSignalWebSocketEnabled()) {
|
||||
Network network = libSignalNetworkSupplier.get();
|
||||
return new LibSignalChatConnection(
|
||||
"libsignal-auth",
|
||||
network,
|
||||
new DynamicCredentialsProvider(),
|
||||
Stories.isFeatureEnabled(),
|
||||
healthMonitor
|
||||
);
|
||||
} else {
|
||||
return new OkHttpWebSocketConnection("normal",
|
||||
signalServiceConfigurationSupplier.get(),
|
||||
Optional.of(new DynamicCredentialsProvider()),
|
||||
BuildConfig.SIGNAL_AGENT,
|
||||
healthMonitor,
|
||||
Stories.isFeatureEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user