Fix regression with providers being registered.

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2014-11-14 15:44:49 -08:00
parent 31b9dcb5eb
commit 5b08791086

View File

@ -25,9 +25,12 @@ import org.thoughtcrime.securesms.dependencies.InjectableType;
import org.thoughtcrime.securesms.dependencies.TextSecureCommunicationModule; import org.thoughtcrime.securesms.dependencies.TextSecureCommunicationModule;
import org.thoughtcrime.securesms.jobs.GcmRefreshJob; import org.thoughtcrime.securesms.jobs.GcmRefreshJob;
import org.thoughtcrime.securesms.jobs.persistence.EncryptingJobSerializer; import org.thoughtcrime.securesms.jobs.persistence.EncryptingJobSerializer;
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirementProvider;
import org.thoughtcrime.securesms.jobs.requirements.ServiceRequirementProvider;
import org.thoughtcrime.securesms.util.TextSecurePreferences; import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.whispersystems.jobqueue.JobManager; import org.whispersystems.jobqueue.JobManager;
import org.whispersystems.jobqueue.dependencies.DependencyInjector; import org.whispersystems.jobqueue.dependencies.DependencyInjector;
import org.whispersystems.jobqueue.requirements.NetworkRequirementProvider;
import dagger.ObjectGraph; import dagger.ObjectGraph;
@ -77,6 +80,9 @@ public class ApplicationContext extends Application implements DependencyInjecto
.withName("TextSecureJobs") .withName("TextSecureJobs")
.withDependencyInjector(this) .withDependencyInjector(this)
.withJobSerializer(new EncryptingJobSerializer(this)) .withJobSerializer(new EncryptingJobSerializer(this))
.withRequirementProviders(new MasterSecretRequirementProvider(this),
new ServiceRequirementProvider(this),
new NetworkRequirementProvider(this))
.withConsumerThreads(5) .withConsumerThreads(5)
.build(); .build();
} }