Add ISessionCallback#onSessionClosed
Bug: 181984005 Test: m android.hardware.biometrics.fingerprint-update-api Test: m android.hardware.biometrics.face-update-api Test: atest VtsHalBiometricsFingerprintTargetTest Change-Id: I766c3ae0dc9916c376da6432a5545af581dda819
This commit is contained in:
parent
977c1dcfe9
commit
cbbfa93a17
7 changed files with 20 additions and 2 deletions
|
@ -53,4 +53,5 @@ interface ISessionCallback {
|
|||
void onEnrollmentsRemoved(in int[] enrollmentIds);
|
||||
void onAuthenticatorIdRetrieved(in long authenticatorId);
|
||||
void onAuthenticatorIdInvalidated(in long newAuthenticatorId);
|
||||
void onSessionClosed();
|
||||
}
|
||||
|
|
|
@ -227,4 +227,10 @@ interface ISessionCallback {
|
|||
* current set of enrollments.
|
||||
*/
|
||||
void onAuthenticatorIdInvalidated(in long newAuthenticatorId);
|
||||
|
||||
/**
|
||||
* This method notifes the client that this session has closed.
|
||||
* The client must not make any more calls to this session.
|
||||
*/
|
||||
void onSessionClosed();
|
||||
}
|
||||
|
|
|
@ -120,6 +120,8 @@ class SessionCallback : public BnSessionCallback {
|
|||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus onSessionClosed() override { return ndk::ScopedAStatus::ok(); }
|
||||
|
||||
private:
|
||||
std::promise<SessionCallbackInvocation> invocation_promise_;
|
||||
};
|
||||
|
|
|
@ -50,4 +50,5 @@ interface ISessionCallback {
|
|||
void onEnrollmentsRemoved(in int[] enrollmentIds);
|
||||
void onAuthenticatorIdRetrieved(in long authenticatorId);
|
||||
void onAuthenticatorIdInvalidated(in long newAuthenticatorId);
|
||||
void onSessionClosed();
|
||||
}
|
||||
|
|
|
@ -200,4 +200,10 @@ interface ISessionCallback {
|
|||
* current set of enrollments.
|
||||
*/
|
||||
void onAuthenticatorIdInvalidated(in long newAuthenticatorId);
|
||||
|
||||
/**
|
||||
* This method notifes the client that this session has closed.
|
||||
* The client must not make any more calls to this session.
|
||||
*/
|
||||
void onSessionClosed();
|
||||
}
|
||||
|
|
|
@ -219,11 +219,11 @@ ndk::ScopedAStatus Session::resetLockout(int32_t cookie, const keymaster::Hardwa
|
|||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Session::close(int32_t cookie) {
|
||||
ndk::ScopedAStatus Session::close(int32_t /*cookie*/) {
|
||||
LOG(INFO) << "close";
|
||||
CHECK(mCurrentState == SessionState::IDLING) << "Can't close a non-idling session. Crashing.";
|
||||
mCurrentState = SessionState::CLOSED;
|
||||
mCb->onStateChanged(cookie, mCurrentState);
|
||||
mCb->onSessionClosed();
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
|
|
|
@ -119,6 +119,8 @@ class SessionCallback : public BnSessionCallback {
|
|||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus onSessionClosed() override { return ndk::ScopedAStatus::ok(); }
|
||||
|
||||
private:
|
||||
bool mIsPromiseValid;
|
||||
std::vector<Invocation> mInvocations;
|
||||
|
|
Loading…
Reference in a new issue