Merge "authsecret: Notify LSS to generate secret" into rvc-qpr-dev am: fc9c51d1a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12771635 Change-Id: I8ef34701cd303eb78a8303bd8e3e087fc777aac9
This commit is contained in:
commit
edaef8bea0
1 changed files with 8 additions and 0 deletions
|
@ -34,11 +34,19 @@ class AuthSecretHidlTest : public testing::TestWithParam<std::string> {
|
|||
authsecret = IAuthSecret::getService(GetParam());
|
||||
ASSERT_NE(authsecret, nullptr);
|
||||
|
||||
// Notify LSS to generate PIN code '1234' and corresponding secret.
|
||||
(void)system("cmd lock_settings set-pin 1234");
|
||||
|
||||
// All tests must enroll the correct secret first as this cannot be changed
|
||||
// without a factory reset and the order of tests could change.
|
||||
authsecret->primaryUserCredential(CORRECT_SECRET);
|
||||
}
|
||||
|
||||
static void TearDownTestSuite() {
|
||||
// clean up PIN code after testing
|
||||
(void)system("cmd lock_settings clear --old 1234");
|
||||
}
|
||||
|
||||
sp<IAuthSecret> authsecret;
|
||||
hidl_vec<uint8_t> CORRECT_SECRET{61, 93, 124, 240, 5, 0, 7, 201, 9, 129, 11, 12, 0, 14, 0, 16};
|
||||
hidl_vec<uint8_t> WRONG_SECRET{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
|
||||
|
|
Loading…
Reference in a new issue