Search in sources :

Example 1 with AlarmSleepTimer

use of org.thoughtcrime.securesms.util.AlarmSleepTimer 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)

Example 2 with AlarmSleepTimer

use of org.thoughtcrime.securesms.util.AlarmSleepTimer in project Signal-Android by signalapp.

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)

Example 3 with AlarmSleepTimer

use of org.thoughtcrime.securesms.util.AlarmSleepTimer in project mollyim-android by mollyim.

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)3 SignalWebSocketHealthMonitor (org.thoughtcrime.securesms.net.SignalWebSocketHealthMonitor)3 AlarmSleepTimer (org.thoughtcrime.securesms.util.AlarmSleepTimer)3 SignalWebSocket (org.whispersystems.signalservice.api.SignalWebSocket)3 SleepTimer (org.whispersystems.signalservice.api.util.SleepTimer)3 UptimeSleepTimer (org.whispersystems.signalservice.api.util.UptimeSleepTimer)3