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

Commit aea1e39b authored by Dmitry Dementyev's avatar Dmitry Dementyev
Browse files

Temporary use hardcoded counterId.

Bug: 66499222
Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I0f387e6a424f24de340276fc45cfaddb3529a715
parent 1ebcf610
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -229,6 +229,9 @@ public class KeySyncTask implements Runnable {
            }
        }

        // TODO: make sure the same counter id is used during recovery and remove temporary fix.
        counterId = 1L;

        byte[] vaultParams = KeySyncUtils.packVaultParams(
                publicKey,
                counterId,
+1 −0
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ public class KeySyncTaskTest {
                KeyDerivationParams.getSalt(),
                TEST_CREDENTIAL);
        Long counterId = mRecoverableKeyStoreDb.getCounterId(TEST_USER_ID, TEST_RECOVERY_AGENT_UID);
        counterId = 1L; // TODO: use value from the database.
        assertThat(counterId).isNotNull();
        byte[] recoveryKey = decryptThmEncryptedKey(
                lockScreenHash,