Search in sources :

Example 1 with SignalWebSocket

use of org.whispersystems.signalservice.api.SignalWebSocket in project Signal-Android by WhisperSystems.

the class ApplicationDependencyProvider method provideSignalWebSocket.

@Override
@NonNull
public SignalWebSocket provideSignalWebSocket() {
    SleepTimer sleepTimer = SignalStore.account().isFcmEnabled() ? new UptimeSleepTimer() : new AlarmSleepTimer(context);
    SignalWebSocketHealthMonitor healthMonitor = new SignalWebSocketHealthMonitor(context, sleepTimer);
    SignalWebSocket signalWebSocket = new SignalWebSocket(provideWebSocketFactory(healthMonitor));
    healthMonitor.monitor(signalWebSocket);
    return signalWebSocket;
}
Also used : SleepTimer(org.whispersystems.signalservice.api.util.SleepTimer) UptimeSleepTimer(org.whispersystems.signalservice.api.util.UptimeSleepTimer) AlarmSleepTimer(org.thoughtcrime.securesms.util.AlarmSleepTimer) UptimeSleepTimer(org.whispersystems.signalservice.api.util.UptimeSleepTimer) SignalWebSocketHealthMonitor(org.thoughtcrime.securesms.net.SignalWebSocketHealthMonitor) SignalWebSocket(org.whispersystems.signalservice.api.SignalWebSocket) AlarmSleepTimer(org.thoughtcrime.securesms.util.AlarmSleepTimer) NonNull(androidx.annotation.NonNull)

Aggregations

NonNull (androidx.annotation.NonNull)1 SignalWebSocketHealthMonitor (org.thoughtcrime.securesms.net.SignalWebSocketHealthMonitor)1 AlarmSleepTimer (org.thoughtcrime.securesms.util.AlarmSleepTimer)1 SignalWebSocket (org.whispersystems.signalservice.api.SignalWebSocket)1 SleepTimer (org.whispersystems.signalservice.api.util.SleepTimer)1 UptimeSleepTimer (org.whispersystems.signalservice.api.util.UptimeSleepTimer)1