Address review comments.

This commit is contained in:
Jorge Martín 2022-08-09 12:57:59 +02:00
parent dfc8526b47
commit cc59b9e695
2 changed files with 3 additions and 3 deletions

View file

@ -39,6 +39,7 @@ import im.vector.app.features.pin.lockscreen.ui.fallbackprompt.FallbackBiometric
import im.vector.app.features.pin.lockscreen.utils.DevicePromptCheck
import io.mockk.clearAllMocks
import io.mockk.every
import io.mockk.justRun
import io.mockk.mockk
import io.mockk.mockkObject
import io.mockk.mockkStatic
@ -247,7 +248,7 @@ class BiometricHelperTests {
every { createAuthChannel() } returns mockAuthChannel
every { authenticateWithPromptInternal(any(), any(), any()) } returns mockk()
}
every { lockScreenKeyRepository.deleteSystemKey() } returns Unit
justRun { lockScreenKeyRepository.deleteSystemKey() }
val latch = CountDownLatch(1)
val intent = Intent(InstrumentationRegistry.getInstrumentation().targetContext, LockScreenTestActivity::class.java)

View file

@ -182,8 +182,7 @@ class LockScreenViewModel @AssistedInject constructor(
* See issue [#6768](https://github.com/vector-im/element-android/issues/6768).
*/
@SuppressLint("NewApi")
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
internal suspend fun waitUntilKeyguardIsUnlocked() {
private suspend fun waitUntilKeyguardIsUnlocked() {
if (versionProvider.get() < Build.VERSION_CODES.S) return
withTimeoutOrNull(5.seconds) {
while (keyguardManager.isDeviceLocked) {