2014-07-25 15:14:29 -07:00
|
|
|
package org.thoughtcrime.securesms.jobs;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
2014-08-04 16:15:13 -07:00
|
|
|
import org.whispersystems.jobqueue.Job;
|
|
|
|
import org.whispersystems.jobqueue.JobParameters;
|
|
|
|
import org.whispersystems.jobqueue.dependencies.ContextDependent;
|
2014-07-25 15:14:29 -07:00
|
|
|
|
2014-08-04 16:15:13 -07:00
|
|
|
public abstract class ContextJob extends Job implements ContextDependent {
|
2014-07-25 15:14:29 -07:00
|
|
|
|
2014-08-04 16:15:13 -07:00
|
|
|
protected transient Context context;
|
2014-07-25 15:14:29 -07:00
|
|
|
|
2014-08-04 16:15:13 -07:00
|
|
|
protected ContextJob(Context context, JobParameters parameters) {
|
|
|
|
super(parameters);
|
|
|
|
this.context = context;
|
2014-07-25 15:14:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setContext(Context context) {
|
|
|
|
this.context = context;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected Context getContext() {
|
|
|
|
return context;
|
|
|
|
}
|
|
|
|
}
|