diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index aaab48328d..8fbc6ff0c0 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -27,8 +27,8 @@ import org.thoughtcrime.securesms.dependencies.AxolotlStorageModule; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.dependencies.RedPhoneCommunicationModule; import org.thoughtcrime.securesms.dependencies.TextSecureCommunicationModule; +import org.thoughtcrime.securesms.jobs.CreateSignedPreKeyJob; import org.thoughtcrime.securesms.jobs.GcmRefreshJob; -import org.thoughtcrime.securesms.jobs.RefreshAttributesJob; import org.thoughtcrime.securesms.jobs.persistence.EncryptingJobSerializer; import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirementProvider; import org.thoughtcrime.securesms.jobs.requirements.MediaNetworkRequirementProvider; @@ -70,6 +70,7 @@ public class ApplicationContext extends Application implements DependencyInjecto initializeDependencyInjection(); initializeJobManager(); initializeGcmCheck(); + initializeSignedPreKeyCheck(); } @Override @@ -132,4 +133,10 @@ public class ApplicationContext extends Application implements DependencyInjecto } } + private void initializeSignedPreKeyCheck() { + if (!TextSecurePreferences.isSignedPreKeyRegistered(this)) { + jobManager.add(new CreateSignedPreKeyJob(this)); + } + } + }