mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Replace prekey jobs with one overall sync job.
This commit is contained in:
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
@@ -14,6 +15,8 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
import static androidx.annotation.VisibleForTesting.PACKAGE_PRIVATE;
|
||||
|
||||
/**
|
||||
* A durable unit of work.
|
||||
*
|
||||
@@ -193,15 +196,18 @@ public abstract class Job {
|
||||
return new Result(ResultType.FAILURE, runtimeException, null, INVALID_BACKOFF);
|
||||
}
|
||||
|
||||
boolean isSuccess() {
|
||||
@VisibleForTesting(otherwise = PACKAGE_PRIVATE)
|
||||
public boolean isSuccess() {
|
||||
return resultType == ResultType.SUCCESS;
|
||||
}
|
||||
|
||||
boolean isRetry() {
|
||||
@VisibleForTesting(otherwise = PACKAGE_PRIVATE)
|
||||
public boolean isRetry() {
|
||||
return resultType == ResultType.RETRY;
|
||||
}
|
||||
|
||||
boolean isFailure() {
|
||||
@VisibleForTesting(otherwise = PACKAGE_PRIVATE)
|
||||
public boolean isFailure() {
|
||||
return resultType == ResultType.FAILURE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user