mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Prevent backups from being scheduled twice within the jitter window.
Fixes #13559.
This commit is contained in:
committed by
Cody Henthorne
parent
b113eec940
commit
aec0a9951a
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2024 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.thoughtcrime.securesms.testutil
|
||||
|
||||
import java.util.LinkedList
|
||||
import java.util.Random
|
||||
|
||||
class MockRandom(initialInts: List<Int>) : Random() {
|
||||
|
||||
val nextInts = LinkedList(initialInts)
|
||||
|
||||
override fun nextInt(): Int {
|
||||
return nextInts.remove()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user