// Ends the registration. After this is called, no more CallbackHandles will be registered.
// It is safe to send a callback if the Transaction doesn't have any Pending callback handles.
status_t TransactionCallbackInvoker::endRegistration(const ListenerCallbacks& listenerCallbacks) {
std::lock_guard lock(mMutex);
auto itr = mRegisteringTransactions.find(listenerCallbacks);
if (itr == mRegisteringTransactions.end()) {
ALOGE("cannot end a registration that does not exist");
return BAD_VALUE;
}
mRegisteringTransactions.erase(itr);
return NO_ERROR;
}
mRegisteringTransactions
中移除 ListenerCallbacks。