mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 02:55:23 +00:00
Update WorkManager to 1.0.0-alpha11.
This commit is contained in:
parent
8a1a47e773
commit
81055e61a6
@ -70,7 +70,7 @@ dependencies {
|
|||||||
compile 'com.android.support:multidex:1.0.3'
|
compile 'com.android.support:multidex:1.0.3'
|
||||||
compile 'android.arch.lifecycle:extensions:1.1.1'
|
compile 'android.arch.lifecycle:extensions:1.1.1'
|
||||||
compile 'android.arch.lifecycle:common-java8:1.1.1'
|
compile 'android.arch.lifecycle:common-java8:1.1.1'
|
||||||
compile 'android.arch.work:work-runtime:1.0.0-alpha09'
|
compile 'android.arch.work:work-runtime:1.0.0-alpha11'
|
||||||
|
|
||||||
compile 'com.google.android.gms:play-services-gcm:9.6.1'
|
compile 'com.google.android.gms:play-services-gcm:9.6.1'
|
||||||
compile 'com.google.android.gms:play-services-maps:9.6.1'
|
compile 'com.google.android.gms:play-services-maps:9.6.1'
|
||||||
@ -149,7 +149,6 @@ dependencies {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Update dependencies after getting final libsignal
|
|
||||||
dependencyVerification {
|
dependencyVerification {
|
||||||
verify = [
|
verify = [
|
||||||
'com.android.support:design:7874ad1904eedc74aa41cffffb7f759d8990056f3bbbc9264911651c67c42f5f',
|
'com.android.support:design:7874ad1904eedc74aa41cffffb7f759d8990056f3bbbc9264911651c67c42f5f',
|
||||||
@ -167,7 +166,7 @@ dependencyVerification {
|
|||||||
'com.android.support:gridlayout-v7:5029529f7db66f8773426bf7318645f0840fc50d74f66355cd60c5e58d2da087',
|
'com.android.support:gridlayout-v7:5029529f7db66f8773426bf7318645f0840fc50d74f66355cd60c5e58d2da087',
|
||||||
'com.android.support:exifinterface:bbf44e519edd6333a24a3285aa21fd00181b920b81ca8aa89a8899f03ab4d6b0',
|
'com.android.support:exifinterface:bbf44e519edd6333a24a3285aa21fd00181b920b81ca8aa89a8899f03ab4d6b0',
|
||||||
'com.android.support:multidex:ecf6098572e23b5155bab3b9a82b2fd1530eda6c6c157745e0f5287c66eec60c',
|
'com.android.support:multidex:ecf6098572e23b5155bab3b9a82b2fd1530eda6c6c157745e0f5287c66eec60c',
|
||||||
'android.arch.work:work-runtime:eda29b2cad202dee05a2e5aafe0a37c93ba9cde8f7cc0d0c8926a9f1a9498a8f',
|
'android.arch.work:work-runtime:e2cff8a2231da07519b65af64e77e5da20b1fc5a016bb49ddade40beb44a63ff',
|
||||||
'android.arch.lifecycle:extensions:429426b2feec2245ffc5e75b3b5309bedb36159cf06dc71843ae43526ac289b6',
|
'android.arch.lifecycle:extensions:429426b2feec2245ffc5e75b3b5309bedb36159cf06dc71843ae43526ac289b6',
|
||||||
'android.arch.lifecycle:common-java8:7078b5c8ccb94203df9cc2a463c69cf0021596e6cf966d78fbfd697aaafe0630',
|
'android.arch.lifecycle:common-java8:7078b5c8ccb94203df9cc2a463c69cf0021596e6cf966d78fbfd697aaafe0630',
|
||||||
'com.google.android.gms:play-services-gcm:312e61253a236f2d9b750b9c04fc92fd190d23b0b2755c99de6ce4a28b259dae',
|
'com.google.android.gms:play-services-gcm:312e61253a236f2d9b750b9c04fc92fd190d23b0b2755c99de6ce4a28b259dae',
|
||||||
@ -240,7 +239,7 @@ dependencyVerification {
|
|||||||
'com.android.support:localbroadcastmanager:d287c823af5fdde72c099fcfc5f630efe9687af7a914343ae6fd92de32c8a806',
|
'com.android.support:localbroadcastmanager:d287c823af5fdde72c099fcfc5f630efe9687af7a914343ae6fd92de32c8a806',
|
||||||
'com.android.support:print:4be8a812d73e4a80e35b91ceae127def3f0bb9726bf3bc439aa0cc81503f5728',
|
'com.android.support:print:4be8a812d73e4a80e35b91ceae127def3f0bb9726bf3bc439aa0cc81503f5728',
|
||||||
'com.android.support:support-annotations:5d5b9414f02d3fa0ee7526b8d5ddae0da67c8ecc8c4d63ffa6cf91488a93b927',
|
'com.android.support:support-annotations:5d5b9414f02d3fa0ee7526b8d5ddae0da67c8ecc8c4d63ffa6cf91488a93b927',
|
||||||
'androidx.concurrent:futures:1f63078c41efd29d20ee3444fba93c6cdfaeeb862c6d3b6166ff8debd37d471a',
|
'com.google.guava:listenablefuture:e4ad7607e5c0477c6f890ef26a49cb8d1bb4dffb650bab4502afee64644e3069',
|
||||||
'org.signal:signal-metadata-android:d9d798aab7ee7200373ecff8718baf8aaeb632c123604e8a41b7b4c0c97eeee1',
|
'org.signal:signal-metadata-android:d9d798aab7ee7200373ecff8718baf8aaeb632c123604e8a41b7b4c0c97eeee1',
|
||||||
'org.whispersystems:signal-service-java:a156f4025ce59abb1b48c089719323cd0e82d6ab4bdd345c408a5e44121499b1',
|
'org.whispersystems:signal-service-java:a156f4025ce59abb1b48c089719323cd0e82d6ab4bdd345c408a5e44121499b1',
|
||||||
'com.github.bumptech.glide:disklrucache:c1b1b6f5bbd01e2fcdc9d7f60913c8d338bdb65ed4a93bfa02b56f19daaade4b',
|
'com.github.bumptech.glide:disklrucache:c1b1b6f5bbd01e2fcdc9d7f60913c8d338bdb65ed4a93bfa02b56f19daaade4b',
|
||||||
@ -250,8 +249,6 @@ dependencyVerification {
|
|||||||
'com.klinkerapps:logger:177e325259a8b111ad6745ec10db5861723c99f402222b80629f576f49408541',
|
'com.klinkerapps:logger:177e325259a8b111ad6745ec10db5861723c99f402222b80629f576f49408541',
|
||||||
'com.google.android:flexbox:a9989fd13ae2ee42765dfc515fe362edf4f326e74925d02a10369df8092a4935',
|
'com.google.android:flexbox:a9989fd13ae2ee42765dfc515fe362edf4f326e74925d02a10369df8092a4935',
|
||||||
'org.jsoup:jsoup:abeaf34795a4de70f72aed6de5966d2955ec7eb348eeb813324f23c999575473',
|
'org.jsoup:jsoup:abeaf34795a4de70f72aed6de5966d2955ec7eb348eeb813324f23c999575473',
|
||||||
'com.google.guava:listenablefuture:e4ad7607e5c0477c6f890ef26a49cb8d1bb4dffb650bab4502afee64644e3069',
|
|
||||||
'androidx.annotation:annotation:04f22f257944ce223701d5aa1bdc36fb7f4594e87b539044045cd161d965468e',
|
|
||||||
'org.whispersystems:signal-protocol-android:b41b7c3a47b0a4ce35802474ae7c5ddc8f033d80209e98abf7ec669543b2b3ee',
|
'org.whispersystems:signal-protocol-android:b41b7c3a47b0a4ce35802474ae7c5ddc8f033d80209e98abf7ec669543b2b3ee',
|
||||||
'org.signal:signal-metadata-java:af1d0dd766b1e301ed1c44e65161084cf03e2587fe97fdd29ecbea58c6aa6930',
|
'org.signal:signal-metadata-java:af1d0dd766b1e301ed1c44e65161084cf03e2587fe97fdd29ecbea58c6aa6930',
|
||||||
'org.whispersystems:signal-protocol-java:b08207f7e1847228f2a1f0d49e113f93c96c6ed8490be14edddd4be55b2a4a4e',
|
'org.whispersystems:signal-protocol-java:b08207f7e1847228f2a1f0d49e113f93c96c6ed8490be14edddd4be55b2a4a4e',
|
||||||
|
@ -3,6 +3,8 @@ package org.thoughtcrime.securesms.components;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.ColorInt;
|
import android.support.annotation.ColorInt;
|
||||||
import android.support.annotation.IdRes;
|
import android.support.annotation.IdRes;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
@ -17,9 +19,6 @@ import org.thoughtcrime.securesms.util.views.Stub;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
public class AlbumThumbnailView extends FrameLayout {
|
public class AlbumThumbnailView extends FrameLayout {
|
||||||
|
|
||||||
private @Nullable SlideClickListener thumbnailClickListener;
|
private @Nullable SlideClickListener thumbnailClickListener;
|
||||||
@ -38,12 +37,12 @@ public class AlbumThumbnailView extends FrameLayout {
|
|||||||
|
|
||||||
private final OnLongClickListener defaultLongClickListener = v -> this.performLongClick();
|
private final OnLongClickListener defaultLongClickListener = v -> this.performLongClick();
|
||||||
|
|
||||||
public AlbumThumbnailView(@NonNull @android.support.annotation.NonNull Context context) {
|
public AlbumThumbnailView(@NonNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlbumThumbnailView(@NonNull @android.support.annotation.NonNull Context context, @Nullable @android.support.annotation.Nullable AttributeSet attrs) {
|
public AlbumThumbnailView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.components.emoji;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -10,8 +11,6 @@ import android.view.View;
|
|||||||
import org.thoughtcrime.securesms.R;
|
import org.thoughtcrime.securesms.R;
|
||||||
import org.thoughtcrime.securesms.util.ResUtil;
|
import org.thoughtcrime.securesms.util.ResUtil;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
public class AsciiEmojiView extends View {
|
public class AsciiEmojiView extends View {
|
||||||
|
|
||||||
private final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
|
private final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
|
||||||
@ -22,7 +21,7 @@ public class AsciiEmojiView extends View {
|
|||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AsciiEmojiView(Context context, @Nullable @android.support.annotation.Nullable AttributeSet attrs) {
|
public AsciiEmojiView(Context context, @Nullable AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.thoughtcrime.securesms.jobmanager;
|
package org.thoughtcrime.securesms.jobmanager;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
@ -14,6 +15,7 @@ import org.thoughtcrime.securesms.logging.Log;
|
|||||||
import org.thoughtcrime.securesms.service.GenericForegroundService;
|
import org.thoughtcrime.securesms.service.GenericForegroundService;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@ -45,7 +47,10 @@ public abstract class Job extends Worker implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* Invoked when a job is first created in our own codebase.
|
* Invoked when a job is first created in our own codebase.
|
||||||
*/
|
*/
|
||||||
protected Job(@Nullable JobParameters parameters) {
|
@SuppressLint("RestrictedApi")
|
||||||
|
protected Job(@NonNull Context context, @Nullable JobParameters parameters) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
|
super(context, new WorkerParameters(null, null, Collections.emptySet(), null, 0, null, null, null));
|
||||||
this.parameters = parameters;
|
this.parameters = parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,13 +124,8 @@ public abstract class Job extends Worker implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStopped(boolean cancelled) {
|
public void onStopped() {
|
||||||
if (cancelled) {
|
log("onStopped()" + logSuffix());
|
||||||
warn("onStopped() with cancellation signal." + logSuffix());
|
|
||||||
onCanceled();
|
|
||||||
} else {
|
|
||||||
log("onStopped()" + logSuffix());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final void onSubmit(@NonNull Context context, @NonNull UUID id) {
|
final void onSubmit(@NonNull Context context, @NonNull UUID id) {
|
||||||
|
@ -3,6 +3,9 @@ package org.thoughtcrime.securesms.jobmanager;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
|
||||||
|
import org.thoughtcrime.securesms.logging.Log;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -17,6 +20,8 @@ import androidx.work.WorkManager;
|
|||||||
|
|
||||||
public class JobManager {
|
public class JobManager {
|
||||||
|
|
||||||
|
private static final String TAG = JobManager.class.getSimpleName();
|
||||||
|
|
||||||
private static final Constraints NETWORK_CONSTRAINT = new Constraints.Builder()
|
private static final Constraints NETWORK_CONSTRAINT = new Constraints.Builder()
|
||||||
.setRequiredNetworkType(NetworkType.CONNECTED)
|
.setRequiredNetworkType(NetworkType.CONNECTED)
|
||||||
.build();
|
.build();
|
||||||
@ -33,7 +38,11 @@ public class JobManager {
|
|||||||
|
|
||||||
public void add(Job job) {
|
public void add(Job job) {
|
||||||
executor.execute(() -> {
|
executor.execute(() -> {
|
||||||
workManager.synchronous().pruneWorkSync();
|
try {
|
||||||
|
workManager.pruneWork().getResult().get();
|
||||||
|
} catch (ExecutionException | InterruptedException e) {
|
||||||
|
Log.w(TAG, "Failed to prune work.", e);
|
||||||
|
}
|
||||||
|
|
||||||
JobParameters jobParameters = job.getJobParameters();
|
JobParameters jobParameters = job.getJobParameters();
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ import java.io.InputStream;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class AttachmentDownloadJob extends ContextJob implements InjectableType {
|
public class AttachmentDownloadJob extends ContextJob implements InjectableType {
|
||||||
private static final long serialVersionUID = 2L;
|
private static final long serialVersionUID = 2L;
|
||||||
@ -56,8 +57,8 @@ public class AttachmentDownloadJob extends ContextJob implements InjectableType
|
|||||||
private long partUniqueId;
|
private long partUniqueId;
|
||||||
private boolean manual;
|
private boolean manual;
|
||||||
|
|
||||||
public AttachmentDownloadJob() {
|
public AttachmentDownloadJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AttachmentDownloadJob(Context context, long messageId, AttachmentId attachmentId, boolean manual) {
|
public AttachmentDownloadJob(Context context, long messageId, AttachmentId attachmentId, boolean manual) {
|
||||||
|
@ -30,6 +30,7 @@ import java.io.InputStream;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class AvatarDownloadJob extends ContextJob implements InjectableType {
|
public class AvatarDownloadJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -44,8 +45,8 @@ public class AvatarDownloadJob extends ContextJob implements InjectableType {
|
|||||||
|
|
||||||
private byte[] groupId;
|
private byte[] groupId;
|
||||||
|
|
||||||
public AvatarDownloadJob() {
|
public AvatarDownloadJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AvatarDownloadJob(Context context, @NonNull byte[] groupId) {
|
public AvatarDownloadJob(Context context, @NonNull byte[] groupId) {
|
||||||
|
@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
import static org.thoughtcrime.securesms.dependencies.AxolotlStorageModule.SignedPreKeyStoreFactory;
|
import static org.thoughtcrime.securesms.dependencies.AxolotlStorageModule.SignedPreKeyStoreFactory;
|
||||||
|
|
||||||
@ -39,8 +40,8 @@ public class CleanPreKeysJob extends ContextJob implements InjectableType {
|
|||||||
@Inject transient SignalServiceAccountManager accountManager;
|
@Inject transient SignalServiceAccountManager accountManager;
|
||||||
@Inject transient SignedPreKeyStoreFactory signedPreKeyStoreFactory;
|
@Inject transient SignedPreKeyStoreFactory signedPreKeyStoreFactory;
|
||||||
|
|
||||||
public CleanPreKeysJob() {
|
public CleanPreKeysJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CleanPreKeysJob(Context context) {
|
public CleanPreKeysJob(Context context) {
|
||||||
|
@ -1,17 +1,24 @@
|
|||||||
package org.thoughtcrime.securesms.jobs;
|
package org.thoughtcrime.securesms.jobs;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.jobmanager.Job;
|
import org.thoughtcrime.securesms.jobmanager.Job;
|
||||||
import org.thoughtcrime.securesms.jobmanager.JobParameters;
|
import org.thoughtcrime.securesms.jobmanager.JobParameters;
|
||||||
import org.thoughtcrime.securesms.jobmanager.dependencies.ContextDependent;
|
import org.thoughtcrime.securesms.jobmanager.dependencies.ContextDependent;
|
||||||
|
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public abstract class ContextJob extends Job implements ContextDependent {
|
public abstract class ContextJob extends Job implements ContextDependent {
|
||||||
|
|
||||||
protected transient Context context;
|
protected transient Context context;
|
||||||
|
|
||||||
protected ContextJob(Context context, JobParameters parameters) {
|
protected ContextJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(parameters);
|
super(context, workerParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ContextJob(@NonNull Context context, @NonNull JobParameters parameters) {
|
||||||
|
super(context, parameters);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class CreateSignedPreKeyJob extends ContextJob implements InjectableType {
|
public class CreateSignedPreKeyJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -30,8 +31,8 @@ public class CreateSignedPreKeyJob extends ContextJob implements InjectableType
|
|||||||
|
|
||||||
@Inject transient SignalServiceAccountManager accountManager;
|
@Inject transient SignalServiceAccountManager accountManager;
|
||||||
|
|
||||||
public CreateSignedPreKeyJob() {
|
public CreateSignedPreKeyJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreateSignedPreKeyJob(Context context) {
|
public CreateSignedPreKeyJob(Context context) {
|
||||||
|
@ -16,6 +16,7 @@ import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class DirectoryRefreshJob extends ContextJob {
|
public class DirectoryRefreshJob extends ContextJob {
|
||||||
|
|
||||||
@ -27,8 +28,8 @@ public class DirectoryRefreshJob extends ContextJob {
|
|||||||
@Nullable private transient Recipient recipient;
|
@Nullable private transient Recipient recipient;
|
||||||
private transient boolean notifyOfNewUsers;
|
private transient boolean notifyOfNewUsers;
|
||||||
|
|
||||||
public DirectoryRefreshJob() {
|
public DirectoryRefreshJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DirectoryRefreshJob(@NonNull Context context, boolean notifyOfNewUsers) {
|
public DirectoryRefreshJob(@NonNull Context context, boolean notifyOfNewUsers) {
|
||||||
|
@ -44,6 +44,7 @@ import org.whispersystems.signalservice.api.push.exceptions.NonSuccessfulRespons
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class GcmRefreshJob extends ContextJob implements InjectableType {
|
public class GcmRefreshJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -53,8 +54,8 @@ public class GcmRefreshJob extends ContextJob implements InjectableType {
|
|||||||
|
|
||||||
@Inject transient SignalServiceAccountManager textSecureAccountManager;
|
@Inject transient SignalServiceAccountManager textSecureAccountManager;
|
||||||
|
|
||||||
public GcmRefreshJob() {
|
public GcmRefreshJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GcmRefreshJob(Context context) {
|
public GcmRefreshJob(Context context) {
|
||||||
|
@ -28,13 +28,14 @@ import java.util.Date;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class LocalBackupJob extends ContextJob {
|
public class LocalBackupJob extends ContextJob {
|
||||||
|
|
||||||
private static final String TAG = LocalBackupJob.class.getSimpleName();
|
private static final String TAG = LocalBackupJob.class.getSimpleName();
|
||||||
|
|
||||||
public LocalBackupJob() {
|
public LocalBackupJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalBackupJob(@NonNull Context context) {
|
public LocalBackupJob(@NonNull Context context) {
|
||||||
|
@ -48,6 +48,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MmsDownloadJob extends ContextJob {
|
public class MmsDownloadJob extends ContextJob {
|
||||||
|
|
||||||
@ -63,8 +64,8 @@ public class MmsDownloadJob extends ContextJob {
|
|||||||
private long threadId;
|
private long threadId;
|
||||||
private boolean automatic;
|
private boolean automatic;
|
||||||
|
|
||||||
public MmsDownloadJob() {
|
public MmsDownloadJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MmsDownloadJob(Context context, long messageId, long threadId, boolean automatic) {
|
public MmsDownloadJob(Context context, long messageId, long threadId, boolean automatic) {
|
||||||
|
@ -25,6 +25,7 @@ import org.thoughtcrime.securesms.util.Util;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MmsReceiveJob extends ContextJob {
|
public class MmsReceiveJob extends ContextJob {
|
||||||
|
|
||||||
@ -38,8 +39,8 @@ public class MmsReceiveJob extends ContextJob {
|
|||||||
private byte[] data;
|
private byte[] data;
|
||||||
private int subscriptionId;
|
private int subscriptionId;
|
||||||
|
|
||||||
public MmsReceiveJob() {
|
public MmsReceiveJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MmsReceiveJob(Context context, byte[] data, int subscriptionId) {
|
public MmsReceiveJob(Context context, byte[] data, int subscriptionId) {
|
||||||
|
@ -50,6 +50,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MmsSendJob extends SendJob {
|
public class MmsSendJob extends SendJob {
|
||||||
|
|
||||||
@ -61,8 +62,8 @@ public class MmsSendJob extends SendJob {
|
|||||||
|
|
||||||
private long messageId;
|
private long messageId;
|
||||||
|
|
||||||
public MmsSendJob() {
|
public MmsSendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MmsSendJob(Context context, long messageId) {
|
public MmsSendJob(Context context, long messageId) {
|
||||||
|
@ -28,6 +28,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MultiDeviceBlockedUpdateJob extends ContextJob implements InjectableType {
|
public class MultiDeviceBlockedUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -38,8 +39,8 @@ public class MultiDeviceBlockedUpdateJob extends ContextJob implements Injectabl
|
|||||||
|
|
||||||
@Inject transient SignalServiceMessageSender messageSender;
|
@Inject transient SignalServiceMessageSender messageSender;
|
||||||
|
|
||||||
public MultiDeviceBlockedUpdateJob() {
|
public MultiDeviceBlockedUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceBlockedUpdateJob(Context context) {
|
public MultiDeviceBlockedUpdateJob(Context context) {
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MultiDeviceConfigurationUpdateJob extends ContextJob implements InjectableType {
|
public class MultiDeviceConfigurationUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -39,8 +40,8 @@ public class MultiDeviceConfigurationUpdateJob extends ContextJob implements Inj
|
|||||||
private boolean typingIndicatorsEnabled;
|
private boolean typingIndicatorsEnabled;
|
||||||
private boolean unidentifiedDeliveryIndicatorsEnabled;
|
private boolean unidentifiedDeliveryIndicatorsEnabled;
|
||||||
|
|
||||||
public MultiDeviceConfigurationUpdateJob() {
|
public MultiDeviceConfigurationUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceConfigurationUpdateJob(Context context, boolean readReceiptsEnabled, boolean typingIndicatorsEnabled, boolean unidentifiedDeliveryIndicatorsEnabled) {
|
public MultiDeviceConfigurationUpdateJob(Context context, boolean readReceiptsEnabled, boolean typingIndicatorsEnabled, boolean unidentifiedDeliveryIndicatorsEnabled) {
|
||||||
|
@ -50,6 +50,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MultiDeviceContactUpdateJob extends ContextJob implements InjectableType {
|
public class MultiDeviceContactUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -68,8 +69,8 @@ public class MultiDeviceContactUpdateJob extends ContextJob implements Injectabl
|
|||||||
|
|
||||||
private boolean forceSync;
|
private boolean forceSync;
|
||||||
|
|
||||||
public MultiDeviceContactUpdateJob() {
|
public MultiDeviceContactUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceContactUpdateJob(@NonNull Context context) {
|
public MultiDeviceContactUpdateJob(@NonNull Context context) {
|
||||||
|
@ -37,6 +37,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MultiDeviceGroupUpdateJob extends ContextJob implements InjectableType {
|
public class MultiDeviceGroupUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -45,8 +46,8 @@ public class MultiDeviceGroupUpdateJob extends ContextJob implements InjectableT
|
|||||||
|
|
||||||
@Inject transient SignalServiceMessageSender messageSender;
|
@Inject transient SignalServiceMessageSender messageSender;
|
||||||
|
|
||||||
public MultiDeviceGroupUpdateJob() {
|
public MultiDeviceGroupUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceGroupUpdateJob(Context context) {
|
public MultiDeviceGroupUpdateJob(Context context) {
|
||||||
|
@ -31,6 +31,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MultiDeviceProfileKeyUpdateJob extends ContextJob implements InjectableType {
|
public class MultiDeviceProfileKeyUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -39,8 +40,8 @@ public class MultiDeviceProfileKeyUpdateJob extends ContextJob implements Inject
|
|||||||
|
|
||||||
@Inject transient SignalServiceMessageSender messageSender;
|
@Inject transient SignalServiceMessageSender messageSender;
|
||||||
|
|
||||||
public MultiDeviceProfileKeyUpdateJob() {
|
public MultiDeviceProfileKeyUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceProfileKeyUpdateJob(Context context) {
|
public MultiDeviceProfileKeyUpdateJob(Context context) {
|
||||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use {@link MultiDeviceConfigurationUpdateJob}.
|
* Use {@link MultiDeviceConfigurationUpdateJob}.
|
||||||
@ -39,8 +40,8 @@ public class MultiDeviceReadReceiptUpdateJob extends ContextJob implements Injec
|
|||||||
|
|
||||||
private boolean enabled;
|
private boolean enabled;
|
||||||
|
|
||||||
public MultiDeviceReadReceiptUpdateJob() {
|
public MultiDeviceReadReceiptUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceReadReceiptUpdateJob(Context context, boolean enabled) {
|
public MultiDeviceReadReceiptUpdateJob(Context context, boolean enabled) {
|
||||||
|
@ -31,6 +31,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MultiDeviceReadUpdateJob extends ContextJob implements InjectableType {
|
public class MultiDeviceReadUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -43,8 +44,8 @@ public class MultiDeviceReadUpdateJob extends ContextJob implements InjectableTy
|
|||||||
|
|
||||||
@Inject transient SignalServiceMessageSender messageSender;
|
@Inject transient SignalServiceMessageSender messageSender;
|
||||||
|
|
||||||
public MultiDeviceReadUpdateJob() {
|
public MultiDeviceReadUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceReadUpdateJob(Context context, List<SyncMessageId> messageIds) {
|
public MultiDeviceReadUpdateJob(Context context, List<SyncMessageId> messageIds) {
|
||||||
|
@ -29,6 +29,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class MultiDeviceVerifiedUpdateJob extends ContextJob implements InjectableType {
|
public class MultiDeviceVerifiedUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -49,8 +50,8 @@ public class MultiDeviceVerifiedUpdateJob extends ContextJob implements Injectab
|
|||||||
private VerifiedStatus verifiedStatus;
|
private VerifiedStatus verifiedStatus;
|
||||||
private long timestamp;
|
private long timestamp;
|
||||||
|
|
||||||
public MultiDeviceVerifiedUpdateJob() {
|
public MultiDeviceVerifiedUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiDeviceVerifiedUpdateJob(Context context, Address destination, IdentityKey identityKey, VerifiedStatus verifiedStatus) {
|
public MultiDeviceVerifiedUpdateJob(Context context, Address destination, IdentityKey identityKey, VerifiedStatus verifiedStatus) {
|
||||||
|
@ -14,6 +14,7 @@ import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class PushContentReceiveJob extends PushReceivedJob {
|
public class PushContentReceiveJob extends PushReceivedJob {
|
||||||
|
|
||||||
@ -24,8 +25,8 @@ public class PushContentReceiveJob extends PushReceivedJob {
|
|||||||
|
|
||||||
private String data;
|
private String data;
|
||||||
|
|
||||||
public PushContentReceiveJob() {
|
public PushContentReceiveJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PushContentReceiveJob(Context context) {
|
public PushContentReceiveJob(Context context) {
|
||||||
|
@ -105,6 +105,7 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class PushDecryptJob extends ContextJob {
|
public class PushDecryptJob extends ContextJob {
|
||||||
|
|
||||||
@ -118,8 +119,8 @@ public class PushDecryptJob extends ContextJob {
|
|||||||
private long messageId;
|
private long messageId;
|
||||||
private long smsMessageId;
|
private long smsMessageId;
|
||||||
|
|
||||||
public PushDecryptJob() {
|
public PushDecryptJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PushDecryptJob(Context context) {
|
public PushDecryptJob(Context context) {
|
||||||
|
@ -53,6 +53,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class PushGroupSendJob extends PushSendJob implements InjectableType {
|
public class PushGroupSendJob extends PushSendJob implements InjectableType {
|
||||||
|
|
||||||
@ -69,8 +70,8 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
|
|||||||
private long filterRecipientId; // Deprecated
|
private long filterRecipientId; // Deprecated
|
||||||
private String filterAddress;
|
private String filterAddress;
|
||||||
|
|
||||||
public PushGroupSendJob() {
|
public PushGroupSendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PushGroupSendJob(Context context, long messageId, @NonNull Address destination, @Nullable Address filterAddress) {
|
public PushGroupSendJob(Context context, long messageId, @NonNull Address destination, @Nullable Address filterAddress) {
|
||||||
|
@ -35,6 +35,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class PushGroupUpdateJob extends ContextJob implements InjectableType {
|
public class PushGroupUpdateJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -50,8 +51,8 @@ public class PushGroupUpdateJob extends ContextJob implements InjectableType {
|
|||||||
private String source;
|
private String source;
|
||||||
private byte[] groupId;
|
private byte[] groupId;
|
||||||
|
|
||||||
public PushGroupUpdateJob() {
|
public PushGroupUpdateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PushGroupUpdateJob(Context context, String source, byte[] groupId) {
|
public PushGroupUpdateJob(Context context, String source, byte[] groupId) {
|
||||||
|
@ -39,6 +39,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class PushMediaSendJob extends PushSendJob implements InjectableType {
|
public class PushMediaSendJob extends PushSendJob implements InjectableType {
|
||||||
|
|
||||||
@ -52,8 +53,8 @@ public class PushMediaSendJob extends PushSendJob implements InjectableType {
|
|||||||
|
|
||||||
private long messageId;
|
private long messageId;
|
||||||
|
|
||||||
public PushMediaSendJob() {
|
public PushMediaSendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PushMediaSendJob(Context context, long messageId, Address destination) {
|
public PushMediaSendJob(Context context, long messageId, Address destination) {
|
||||||
|
@ -17,6 +17,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class PushNotificationReceiveJob extends PushReceivedJob implements InjectableType {
|
public class PushNotificationReceiveJob extends PushReceivedJob implements InjectableType {
|
||||||
|
|
||||||
@ -24,8 +25,8 @@ public class PushNotificationReceiveJob extends PushReceivedJob implements Injec
|
|||||||
|
|
||||||
@Inject transient SignalServiceMessageReceiver receiver;
|
@Inject transient SignalServiceMessageReceiver receiver;
|
||||||
|
|
||||||
public PushNotificationReceiveJob() {
|
public PushNotificationReceiveJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PushNotificationReceiveJob(Context context) {
|
public PushNotificationReceiveJob(Context context) {
|
||||||
|
@ -14,12 +14,18 @@ import org.thoughtcrime.securesms.logging.Log;
|
|||||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||||
import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
|
import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
|
||||||
|
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public abstract class PushReceivedJob extends ContextJob {
|
public abstract class PushReceivedJob extends ContextJob {
|
||||||
|
|
||||||
private static final String TAG = PushReceivedJob.class.getSimpleName();
|
private static final String TAG = PushReceivedJob.class.getSimpleName();
|
||||||
|
|
||||||
public static final Object RECEIVE_LOCK = new Object();
|
public static final Object RECEIVE_LOCK = new Object();
|
||||||
|
|
||||||
|
protected PushReceivedJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
|
super(context, workerParameters);
|
||||||
|
}
|
||||||
|
|
||||||
protected PushReceivedJob(Context context, JobParameters parameters) {
|
protected PushReceivedJob(Context context, JobParameters parameters) {
|
||||||
super(context, parameters);
|
super(context, parameters);
|
||||||
}
|
}
|
||||||
|
@ -41,12 +41,18 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public abstract class PushSendJob extends SendJob {
|
public abstract class PushSendJob extends SendJob {
|
||||||
|
|
||||||
private static final long serialVersionUID = 5906098204770900739L;
|
private static final long serialVersionUID = 5906098204770900739L;
|
||||||
private static final String TAG = PushSendJob.class.getSimpleName();
|
private static final String TAG = PushSendJob.class.getSimpleName();
|
||||||
private static final long CERTIFICATE_EXPIRATION_BUFFER = TimeUnit.DAYS.toMillis(1);
|
private static final long CERTIFICATE_EXPIRATION_BUFFER = TimeUnit.DAYS.toMillis(1);
|
||||||
|
|
||||||
|
protected PushSendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
|
super(context, workerParameters);
|
||||||
|
}
|
||||||
|
|
||||||
protected PushSendJob(Context context, JobParameters parameters) {
|
protected PushSendJob(Context context, JobParameters parameters) {
|
||||||
super(context, parameters);
|
super(context, parameters);
|
||||||
}
|
}
|
||||||
@ -213,7 +219,7 @@ public abstract class PushSendJob extends SendJob {
|
|||||||
Log.d(TAG, "Certificate is valid.");
|
Log.d(TAG, "Certificate is valid.");
|
||||||
} catch (InvalidCertificateException e) {
|
} catch (InvalidCertificateException e) {
|
||||||
Log.w(TAG, "Certificate was invalid at send time. Fetching a new one.", e);
|
Log.w(TAG, "Certificate was invalid at send time. Fetching a new one.", e);
|
||||||
RotateCertificateJob certificateJob = new RotateCertificateJob();
|
RotateCertificateJob certificateJob = new RotateCertificateJob(context);
|
||||||
ApplicationContext.getInstance(context).injectDependencies(certificateJob);
|
ApplicationContext.getInstance(context).injectDependencies(certificateJob);
|
||||||
certificateJob.setContext(context);
|
certificateJob.setContext(context);
|
||||||
certificateJob.onRun();
|
certificateJob.onRun();
|
||||||
|
@ -34,6 +34,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class PushTextSendJob extends PushSendJob implements InjectableType {
|
public class PushTextSendJob extends PushSendJob implements InjectableType {
|
||||||
|
|
||||||
@ -47,8 +48,8 @@ public class PushTextSendJob extends PushSendJob implements InjectableType {
|
|||||||
|
|
||||||
private long messageId;
|
private long messageId;
|
||||||
|
|
||||||
public PushTextSendJob() {
|
public PushTextSendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PushTextSendJob(Context context, long messageId, Address destination) {
|
public PushTextSendJob(Context context, long messageId, Address destination) {
|
||||||
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RefreshAttributesJob extends ContextJob implements InjectableType {
|
public class RefreshAttributesJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -29,8 +30,8 @@ public class RefreshAttributesJob extends ContextJob implements InjectableType {
|
|||||||
|
|
||||||
@Inject transient SignalServiceAccountManager signalAccountManager;
|
@Inject transient SignalServiceAccountManager signalAccountManager;
|
||||||
|
|
||||||
public RefreshAttributesJob() {
|
public RefreshAttributesJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RefreshAttributesJob(Context context) {
|
public RefreshAttributesJob(Context context) {
|
||||||
|
@ -25,6 +25,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RefreshPreKeysJob extends ContextJob implements InjectableType {
|
public class RefreshPreKeysJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -34,8 +35,8 @@ public class RefreshPreKeysJob extends ContextJob implements InjectableType {
|
|||||||
|
|
||||||
@Inject transient SignalServiceAccountManager accountManager;
|
@Inject transient SignalServiceAccountManager accountManager;
|
||||||
|
|
||||||
public RefreshPreKeysJob() {
|
public RefreshPreKeysJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RefreshPreKeysJob(Context context) {
|
public RefreshPreKeysJob(Context context) {
|
||||||
|
@ -24,6 +24,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RefreshUnidentifiedDeliveryAbilityJob extends ContextJob implements InjectableType {
|
public class RefreshUnidentifiedDeliveryAbilityJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -31,8 +32,8 @@ public class RefreshUnidentifiedDeliveryAbilityJob extends ContextJob implements
|
|||||||
|
|
||||||
@Inject transient SignalServiceMessageReceiver receiver;
|
@Inject transient SignalServiceMessageReceiver receiver;
|
||||||
|
|
||||||
public RefreshUnidentifiedDeliveryAbilityJob() {
|
public RefreshUnidentifiedDeliveryAbilityJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RefreshUnidentifiedDeliveryAbilityJob(Context context) {
|
public RefreshUnidentifiedDeliveryAbilityJob(Context context) {
|
||||||
|
@ -24,6 +24,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RequestGroupInfoJob extends ContextJob implements InjectableType {
|
public class RequestGroupInfoJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -40,8 +41,8 @@ public class RequestGroupInfoJob extends ContextJob implements InjectableType {
|
|||||||
private String source;
|
private String source;
|
||||||
private byte[] groupId;
|
private byte[] groupId;
|
||||||
|
|
||||||
public RequestGroupInfoJob() {
|
public RequestGroupInfoJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RequestGroupInfoJob(@NonNull Context context, @NonNull String source, @NonNull byte[] groupId) {
|
public RequestGroupInfoJob(@NonNull Context context, @NonNull String source, @NonNull byte[] groupId) {
|
||||||
|
@ -27,6 +27,7 @@ import java.io.InputStream;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RetrieveProfileAvatarJob extends ContextJob implements InjectableType {
|
public class RetrieveProfileAvatarJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -42,8 +43,8 @@ public class RetrieveProfileAvatarJob extends ContextJob implements InjectableTy
|
|||||||
private String profileAvatar;
|
private String profileAvatar;
|
||||||
private Recipient recipient;
|
private Recipient recipient;
|
||||||
|
|
||||||
public RetrieveProfileAvatarJob() {
|
public RetrieveProfileAvatarJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RetrieveProfileAvatarJob(Context context, Recipient recipient, String profileAvatar) {
|
public RetrieveProfileAvatarJob(Context context, Recipient recipient, String profileAvatar) {
|
||||||
|
@ -39,6 +39,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -50,8 +51,8 @@ public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
|||||||
|
|
||||||
private Recipient recipient;
|
private Recipient recipient;
|
||||||
|
|
||||||
public RetrieveProfileJob() {
|
public RetrieveProfileJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RetrieveProfileJob(Context context, Recipient recipient) {
|
public RetrieveProfileJob(Context context, Recipient recipient) {
|
||||||
|
@ -17,6 +17,7 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
@SuppressWarnings("WeakerAccess")
|
@SuppressWarnings("WeakerAccess")
|
||||||
public class RotateCertificateJob extends ContextJob implements InjectableType {
|
public class RotateCertificateJob extends ContextJob implements InjectableType {
|
||||||
@ -27,8 +28,8 @@ public class RotateCertificateJob extends ContextJob implements InjectableType {
|
|||||||
|
|
||||||
@Inject transient SignalServiceAccountManager accountManager;
|
@Inject transient SignalServiceAccountManager accountManager;
|
||||||
|
|
||||||
public RotateCertificateJob() {
|
public RotateCertificateJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RotateCertificateJob(Context context) {
|
public RotateCertificateJob(Context context) {
|
||||||
|
@ -23,13 +23,14 @@ import java.io.IOException;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RotateProfileKeyJob extends ContextJob implements InjectableType {
|
public class RotateProfileKeyJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@Inject SignalServiceAccountManager accountManager;
|
@Inject SignalServiceAccountManager accountManager;
|
||||||
|
|
||||||
public RotateProfileKeyJob() {
|
public RotateProfileKeyJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RotateProfileKeyJob(Context context) {
|
public RotateProfileKeyJob(Context context) {
|
||||||
|
@ -21,6 +21,7 @@ import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class RotateSignedPreKeyJob extends ContextJob implements InjectableType {
|
public class RotateSignedPreKeyJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -28,8 +29,8 @@ public class RotateSignedPreKeyJob extends ContextJob implements InjectableType
|
|||||||
|
|
||||||
@Inject transient SignalServiceAccountManager accountManager;
|
@Inject transient SignalServiceAccountManager accountManager;
|
||||||
|
|
||||||
public RotateSignedPreKeyJob() {
|
public RotateSignedPreKeyJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RotateSignedPreKeyJob(Context context) {
|
public RotateSignedPreKeyJob(Context context) {
|
||||||
|
@ -23,6 +23,7 @@ import java.util.Collections;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class SendDeliveryReceiptJob extends ContextJob implements InjectableType {
|
public class SendDeliveryReceiptJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -41,8 +42,8 @@ public class SendDeliveryReceiptJob extends ContextJob implements InjectableType
|
|||||||
private long messageId;
|
private long messageId;
|
||||||
private long timestamp;
|
private long timestamp;
|
||||||
|
|
||||||
public SendDeliveryReceiptJob() {
|
public SendDeliveryReceiptJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendDeliveryReceiptJob(Context context, Address address, long messageId) {
|
public SendDeliveryReceiptJob(Context context, Address address, long messageId) {
|
||||||
|
@ -23,11 +23,17 @@ import java.io.IOException;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public abstract class SendJob extends ContextJob {
|
public abstract class SendJob extends ContextJob {
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private final static String TAG = SendJob.class.getSimpleName();
|
private final static String TAG = SendJob.class.getSimpleName();
|
||||||
|
|
||||||
|
protected SendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
|
super(context, workerParameters);
|
||||||
|
}
|
||||||
|
|
||||||
public SendJob(Context context, JobParameters parameters) {
|
public SendJob(Context context, JobParameters parameters) {
|
||||||
super(context, parameters);
|
super(context, parameters);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class SendReadReceiptJob extends ContextJob implements InjectableType {
|
public class SendReadReceiptJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -42,8 +43,8 @@ public class SendReadReceiptJob extends ContextJob implements InjectableType {
|
|||||||
private List<Long> messageIds;
|
private List<Long> messageIds;
|
||||||
private long timestamp;
|
private long timestamp;
|
||||||
|
|
||||||
public SendReadReceiptJob() {
|
public SendReadReceiptJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendReadReceiptJob(Context context, Address address, List<Long> messageIds) {
|
public SendReadReceiptJob(Context context, Address address, List<Long> messageIds) {
|
||||||
|
@ -16,6 +16,7 @@ import java.net.InetAddress;
|
|||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class ServiceOutageDetectionJob extends ContextJob {
|
public class ServiceOutageDetectionJob extends ContextJob {
|
||||||
|
|
||||||
@ -25,8 +26,8 @@ public class ServiceOutageDetectionJob extends ContextJob {
|
|||||||
private static final String IP_FAILURE = "127.0.0.2";
|
private static final String IP_FAILURE = "127.0.0.2";
|
||||||
private static final long CHECK_TIME = 1000 * 60;
|
private static final long CHECK_TIME = 1000 * 60;
|
||||||
|
|
||||||
public ServiceOutageDetectionJob() {
|
public ServiceOutageDetectionJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServiceOutageDetectionJob(Context context) {
|
public ServiceOutageDetectionJob(Context context) {
|
||||||
|
@ -24,6 +24,7 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class SmsReceiveJob extends ContextJob {
|
public class SmsReceiveJob extends ContextJob {
|
||||||
|
|
||||||
@ -38,8 +39,8 @@ public class SmsReceiveJob extends ContextJob {
|
|||||||
|
|
||||||
private int subscriptionId;
|
private int subscriptionId;
|
||||||
|
|
||||||
public SmsReceiveJob() {
|
public SmsReceiveJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmsReceiveJob(@NonNull Context context, @Nullable Object[] pdus, int subscriptionId) {
|
public SmsReceiveJob(@NonNull Context context, @Nullable Object[] pdus, int subscriptionId) {
|
||||||
|
@ -31,6 +31,7 @@ import org.thoughtcrime.securesms.jobmanager.JobParameters;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class SmsSendJob extends SendJob {
|
public class SmsSendJob extends SendJob {
|
||||||
|
|
||||||
@ -43,8 +44,8 @@ public class SmsSendJob extends SendJob {
|
|||||||
private long messageId;
|
private long messageId;
|
||||||
private int runAttempt;
|
private int runAttempt;
|
||||||
|
|
||||||
public SmsSendJob() {
|
public SmsSendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmsSendJob(Context context, long messageId, String name) {
|
public SmsSendJob(Context context, long messageId, String name) {
|
||||||
|
@ -19,6 +19,7 @@ import org.thoughtcrime.securesms.notifications.MessageNotifier;
|
|||||||
import org.thoughtcrime.securesms.service.SmsDeliveryListener;
|
import org.thoughtcrime.securesms.service.SmsDeliveryListener;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class SmsSentJob extends ContextJob {
|
public class SmsSentJob extends ContextJob {
|
||||||
|
|
||||||
@ -35,8 +36,8 @@ public class SmsSentJob extends ContextJob {
|
|||||||
private int result;
|
private int result;
|
||||||
private int runAttempt;
|
private int runAttempt;
|
||||||
|
|
||||||
public SmsSentJob() {
|
public SmsSentJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SmsSentJob(Context context, long messageId, String action, int result, int runAttempt) {
|
public SmsSentJob(Context context, long messageId, String action, int result, int runAttempt) {
|
||||||
|
@ -26,6 +26,7 @@ import org.thoughtcrime.securesms.logging.Log;
|
|||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class TrimThreadJob extends ContextJob {
|
public class TrimThreadJob extends ContextJob {
|
||||||
|
|
||||||
@ -35,8 +36,8 @@ public class TrimThreadJob extends ContextJob {
|
|||||||
|
|
||||||
private long threadId;
|
private long threadId;
|
||||||
|
|
||||||
public TrimThreadJob() {
|
public TrimThreadJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TrimThreadJob(Context context, long threadId) {
|
public TrimThreadJob(Context context, long threadId) {
|
||||||
|
@ -27,6 +27,7 @@ import java.util.List;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
|
|
||||||
public class TypingSendJob extends ContextJob implements InjectableType {
|
public class TypingSendJob extends ContextJob implements InjectableType {
|
||||||
|
|
||||||
@ -40,8 +41,8 @@ public class TypingSendJob extends ContextJob implements InjectableType {
|
|||||||
|
|
||||||
@Inject SignalServiceMessageSender messageSender;
|
@Inject SignalServiceMessageSender messageSender;
|
||||||
|
|
||||||
public TypingSendJob() {
|
public TypingSendJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TypingSendJob(Context context, long threadId, boolean typing) {
|
public TypingSendJob(Context context, long threadId, boolean typing) {
|
||||||
|
@ -30,6 +30,7 @@ import java.io.IOException;
|
|||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
|
|
||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
|
import androidx.work.WorkerParameters;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
@ -38,8 +39,8 @@ public class UpdateApkJob extends ContextJob {
|
|||||||
|
|
||||||
private static final String TAG = UpdateApkJob.class.getSimpleName();
|
private static final String TAG = UpdateApkJob.class.getSimpleName();
|
||||||
|
|
||||||
public UpdateApkJob() {
|
public UpdateApkJob(@NonNull Context context, @NonNull WorkerParameters workerParameters) {
|
||||||
super(null, null);
|
super(context, workerParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UpdateApkJob(Context context) {
|
public UpdateApkJob(Context context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user