diff --git a/app/src/main/java/com/stevesoltys/seedvault/repo/Checker.kt b/app/src/main/java/com/stevesoltys/seedvault/repo/Checker.kt index ffcdf627..9dbb4c1a 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/repo/Checker.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/repo/Checker.kt @@ -8,6 +8,7 @@ package com.stevesoltys.seedvault.repo import androidx.annotation.WorkerThread import com.stevesoltys.seedvault.backend.BackendManager import com.stevesoltys.seedvault.crypto.Crypto +import kotlinx.coroutines.delay import org.calyxos.seedvault.core.backends.AppBackupFileType import org.calyxos.seedvault.core.backends.TopLevelFolder @@ -36,4 +37,9 @@ internal class Checker( return sizeMap.values.sumOf { it.toLong() } } + suspend fun check(percent: Int) { + check(percent in 0..100) { "Percent $percent out of bounds." } + delay(20_000) + } + } diff --git a/app/src/main/java/com/stevesoltys/seedvault/settings/AppCheckFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/settings/AppCheckFragment.kt index 076e8a3f..6512b1cd 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/settings/AppCheckFragment.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/settings/AppCheckFragment.kt @@ -58,7 +58,8 @@ class AppCheckFragment : Fragment() { } v.requireViewById