mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Fix issue where a Job had null JobParameters.
This commit is contained in:
parent
275ca9e3ba
commit
0d48f10806
@ -265,7 +265,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
private void initializePendingMessages() {
|
private void initializePendingMessages() {
|
||||||
if (TextSecurePreferences.getNeedsMessagePull(this)) {
|
if (TextSecurePreferences.getNeedsMessagePull(this)) {
|
||||||
Log.i(TAG, "Scheduling a message fetch.");
|
Log.i(TAG, "Scheduling a message fetch.");
|
||||||
ApplicationContext.getInstance(this).getJobManager().add(new PushNotificationReceiveJob());
|
ApplicationContext.getInstance(this).getJobManager().add(new PushNotificationReceiveJob(this));
|
||||||
TextSecurePreferences.setNeedsMessagePull(this, false);
|
TextSecurePreferences.setNeedsMessagePull(this, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public class JobManager {
|
|||||||
JobParameters jobParameters = job.getJobParameters();
|
JobParameters jobParameters = job.getJobParameters();
|
||||||
|
|
||||||
if (jobParameters == null) {
|
if (jobParameters == null) {
|
||||||
throw new IllegalStateException("Jobs must have JobParameters at this stage.");
|
throw new IllegalStateException("Jobs must have JobParameters at this stage. (" + job.getClass().getSimpleName() + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
Data.Builder dataBuilder = new Data.Builder().putInt(Job.KEY_RETRY_COUNT, jobParameters.getRetryCount())
|
Data.Builder dataBuilder = new Data.Builder().putInt(Job.KEY_RETRY_COUNT, jobParameters.getRetryCount())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user