From 8c8cd413597d5b6da105f759eaa5d4744f55fada Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Fri, 11 Mar 2016 17:07:22 -0800 Subject: [PATCH] Be more persistent about completing the spk job // FREEBIE --- src/org/thoughtcrime/securesms/ApplicationContext.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)); + } + } + }