mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
[Link new device] Unlock with device credentials or application PIN code
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2026 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.features.lockscreen.test
|
||||
|
||||
import io.element.android.features.lockscreen.api.DeviceUnlockEntryPoint
|
||||
import io.element.android.tests.testutils.EnsureNeverCalled
|
||||
|
||||
class FakeDeviceUnlockCallback(
|
||||
private val onCancelLambda: () -> Unit = EnsureNeverCalled(),
|
||||
private val onUnlockedLambda: () -> Unit = EnsureNeverCalled(),
|
||||
) : DeviceUnlockEntryPoint.Callback {
|
||||
override fun onCancel() = onCancelLambda()
|
||||
override fun onUnlocked() = onUnlockedLambda()
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2026 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.features.lockscreen.test
|
||||
|
||||
import com.bumble.appyx.core.modality.BuildContext
|
||||
import com.bumble.appyx.core.node.Node
|
||||
import io.element.android.features.lockscreen.api.DeviceUnlockEntryPoint
|
||||
import io.element.android.tests.testutils.lambda.lambdaError
|
||||
|
||||
class FakeDeviceUnlockEntryPoint : DeviceUnlockEntryPoint {
|
||||
override fun createNode(
|
||||
parentNode: Node,
|
||||
buildContext: BuildContext,
|
||||
): Node = lambdaError()
|
||||
|
||||
override fun requestUnlock(callback: DeviceUnlockEntryPoint.Callback) = lambdaError()
|
||||
}
|
||||
Reference in New Issue
Block a user