mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-01 23:05:33 +00:00
all: spotless
This commit is contained in:
@@ -33,9 +33,8 @@ internal class PublicSuffixList(
|
|||||||
private val scope: CoroutineScope = CoroutineScope(dispatcher)
|
private val scope: CoroutineScope = CoroutineScope(dispatcher)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private val data: PublicSuffixListData by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
private val data: PublicSuffixListData by
|
||||||
PublicSuffixListLoader.load(context)
|
lazy(LazyThreadSafetyMode.PUBLICATION) { PublicSuffixListLoader.load(context) }
|
||||||
}
|
|
||||||
|
|
||||||
/** Prefetch the public suffix list from disk so that it is available in memory. */
|
/** Prefetch the public suffix list from disk so that it is available in memory. */
|
||||||
fun prefetchAsync(): Deferred<Unit> = scope.async { data.run {} }
|
fun prefetchAsync(): Deferred<Unit> = scope.async { data.run {} }
|
||||||
|
@@ -17,13 +17,13 @@ class PGPKeyManagerTest {
|
|||||||
|
|
||||||
@get:Rule val temporaryFolder: TemporaryFolder = TemporaryFolder()
|
@get:Rule val temporaryFolder: TemporaryFolder = TemporaryFolder()
|
||||||
private val filesDir by lazy(LazyThreadSafetyMode.NONE) { temporaryFolder.root }
|
private val filesDir by lazy(LazyThreadSafetyMode.NONE) { temporaryFolder.root }
|
||||||
private val keysDir by lazy(LazyThreadSafetyMode.NONE) {
|
private val keysDir by
|
||||||
File(filesDir, PGPKeyManager.KEY_DIR_NAME)
|
lazy(LazyThreadSafetyMode.NONE) { File(filesDir, PGPKeyManager.KEY_DIR_NAME) }
|
||||||
}
|
|
||||||
private val testCoroutineDispatcher = TestCoroutineDispatcher()
|
private val testCoroutineDispatcher = TestCoroutineDispatcher()
|
||||||
private val keyManager by lazy(LazyThreadSafetyMode.NONE) {
|
private val keyManager by
|
||||||
PGPKeyManager(filesDir.absolutePath, testCoroutineDispatcher)
|
lazy(LazyThreadSafetyMode.NONE) {
|
||||||
}
|
PGPKeyManager(filesDir.absolutePath, testCoroutineDispatcher)
|
||||||
|
}
|
||||||
private val key = PGPKeyManager.makeKey(TestUtils.getArmoredPrivateKey())
|
private val key = PGPKeyManager.makeKey(TestUtils.getArmoredPrivateKey())
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user