mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Start mirroring to SVR2.
This commit is contained in:
committed by
Clark Chen
parent
dfb7304626
commit
e1570e9512
@@ -8,6 +8,8 @@ import androidx.annotation.VisibleForTesting;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.jobmanager.impl.BackoffUtil;
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -93,6 +95,12 @@ public abstract class Job {
|
||||
this.canceled = true;
|
||||
}
|
||||
|
||||
/** Provides a default exponential backoff given the current run attempt. */
|
||||
protected final long defaultBackoff() {
|
||||
return BackoffUtil.exponentialBackoff(runAttempt + 1, FeatureFlags.getDefaultMaxBackoff());
|
||||
}
|
||||
|
||||
|
||||
@WorkerThread
|
||||
final void onSubmit() {
|
||||
Log.i(TAG, JobLogger.format(this, "onSubmit()"));
|
||||
@@ -196,7 +204,6 @@ public abstract class Job {
|
||||
return new Result(ResultType.FAILURE, runtimeException, null, INVALID_BACKOFF);
|
||||
}
|
||||
|
||||
@VisibleForTesting(otherwise = PACKAGE_PRIVATE)
|
||||
public boolean isSuccess() {
|
||||
return resultType == ResultType.SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user