Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d9cc46f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use device credential owner as effective user in Credential Interactor" into main

parents e431db0d 8638e6d8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import org.mockito.junit.MockitoJUnit

private const val USER_ID = 22
private const val OWNER_ID = 10
private const val PASSWORD_ID = 30
private const val OPERATION_ID = 100L
private const val MAX_ATTEMPTS = 5

@@ -247,7 +248,11 @@ class CredentialInteractorImplTest : SysuiTestCase() {
private fun pinRequest(credentialOwner: Int = USER_ID): BiometricPromptRequest.Credential.Pin =
    BiometricPromptRequest.Credential.Pin(
        promptInfo(),
        BiometricUserInfo(userId = USER_ID, deviceCredentialOwnerId = credentialOwner),
        BiometricUserInfo(
            userId = USER_ID,
            deviceCredentialOwnerId = credentialOwner,
            userIdForPasswordEntry = PASSWORD_ID,
        ),
        BiometricOperationInfo(OPERATION_ID),
    )

+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ constructor(
        // Request LockSettingsService to return the Gatekeeper Password in the
        // VerifyCredentialResponse so that we can request a Gatekeeper HAT with the
        // Gatekeeper Password and operationId.
        var effectiveUserId = request.userInfo.userIdForPasswordEntry
        var effectiveUserId = request.userInfo.deviceCredentialOwnerId
        val response =
            if (Flags.privateSpaceBp() && effectiveUserId != request.userInfo.userId) {
                effectiveUserId = request.userInfo.userId