diff options
Diffstat (limited to 'neuralnetworks/aidl/utils/src/ProtectCallback.cpp')
-rw-r--r-- | neuralnetworks/aidl/utils/src/ProtectCallback.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/neuralnetworks/aidl/utils/src/ProtectCallback.cpp b/neuralnetworks/aidl/utils/src/ProtectCallback.cpp index 124641cbb8..54a673caf5 100644 --- a/neuralnetworks/aidl/utils/src/ProtectCallback.cpp +++ b/neuralnetworks/aidl/utils/src/ProtectCallback.cpp @@ -22,7 +22,6 @@ #include <android/binder_auto_utils.h> #include <android/binder_interface_utils.h> #include <nnapi/Result.h> -#include <nnapi/hal/ProtectCallback.h> #include <algorithm> #include <functional> @@ -37,7 +36,7 @@ namespace aidl::android::hardware::neuralnetworks::utils { void DeathMonitor::serviceDied() { std::lock_guard guard(mMutex); std::for_each(mObjects.begin(), mObjects.end(), - [](hal::utils::IProtectedCallback* killable) { killable->notifyAsDeadObject(); }); + [](IProtectedCallback* killable) { killable->notifyAsDeadObject(); }); } void DeathMonitor::serviceDied(void* cookie) { @@ -45,13 +44,13 @@ void DeathMonitor::serviceDied(void* cookie) { deathMonitor->serviceDied(); } -void DeathMonitor::add(hal::utils::IProtectedCallback* killable) const { +void DeathMonitor::add(IProtectedCallback* killable) const { CHECK(killable != nullptr); std::lock_guard guard(mMutex); mObjects.push_back(killable); } -void DeathMonitor::remove(hal::utils::IProtectedCallback* killable) const { +void DeathMonitor::remove(IProtectedCallback* killable) const { CHECK(killable != nullptr); std::lock_guard guard(mMutex); const auto removedIter = std::remove(mObjects.begin(), mObjects.end(), killable); @@ -102,7 +101,7 @@ DeathHandler::~DeathHandler() { } [[nodiscard]] ::android::base::ScopeGuard<DeathHandler::Cleanup> DeathHandler::protectCallback( - hal::utils::IProtectedCallback* killable) const { + IProtectedCallback* killable) const { CHECK(killable != nullptr); kDeathMonitor->add(killable); return ::android::base::make_scope_guard( |