mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Add ISessionCallback#onSessionClosed" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
71823fad7b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user