org.whispersystems.signalservice.api.util.UptimeSleepTimer Java Examples

The following examples show how to use org.whispersystems.signalservice.api.util.UptimeSleepTimer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApplicationDependencyProvider.java    From mollyim-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public @NonNull SignalServiceMessageReceiver provideSignalServiceMessageReceiver() {
  SleepTimer sleepTimer = TextSecurePreferences.isFcmDisabled(context) ? new AlarmSleepTimer(context)
                                                                       : new UptimeSleepTimer();
  return new SignalServiceMessageReceiver(networkAccess.getConfiguration(context),
                                          new DynamicCredentialsProvider(context),
                                          BuildConfig.SIGNAL_AGENT,
                                          new PipeConnectivityListener(),
                                          sleepTimer,
                                          provideClientZkOperations().getProfileOperations());
}
 
Example #2
Source File: ProvisioningManager.java    From signal-cli with GNU General Public License v3.0 5 votes vote down vote up
public ProvisioningManager(String settingsPath, SignalServiceConfiguration serviceConfiguration, String userAgent) {
    this.pathConfig = PathConfig.createDefault(settingsPath);
    this.serviceConfiguration = serviceConfiguration;
    this.userAgent = userAgent;

    identityKey = KeyHelper.generateIdentityKeyPair();
    registrationId = KeyHelper.generateRegistrationId(false);
    password = KeyUtils.createPassword();
    final SleepTimer timer = new UptimeSleepTimer();
    accountManager = new SignalServiceAccountManager(serviceConfiguration, null, null, password, SignalServiceAddress.DEFAULT_DEVICE_ID, userAgent, timer);
}