Cleanup HalInterfaces.h
Prior to this CL, HalInterfaces.h polluted the global namespace through
the "using" declarations. This CL creates a new ::android::nn::hal
namespace and places the names there instead.
This CL also changes the namespace of the Callback objects from
::android::hardware::neuralnetworks::V1_2::implementation to
::android::nn to be consistent with the other parts of frameworks/ml/nn.
Fixes: 72880287
Test: mma
Change-Id: I399ad32f5c541a493429c6fa8e192169a903ea9f
Merged-In: I399ad32f5c541a493429c6fa8e192169a903ea9f
(cherry picked from commit 19af9d2d509621c0b07fb5a0f59abd0adb9de468)
diff --git a/runtime/Callbacks.cpp b/runtime/Callbacks.cpp
index 4fd4f0b..44c97fa 100644
--- a/runtime/Callbacks.cpp
+++ b/runtime/Callbacks.cpp
@@ -19,10 +19,11 @@
#include "Callbacks.h"
#include <android-base/logging.h>
-
#include <limits>
-namespace android::hardware::neuralnetworks::V1_2::implementation {
+namespace android::nn {
+
+using namespace hal;
constexpr Timing kNoTiming = {.timeOnDevice = std::numeric_limits<uint64_t>::max(),
.timeInDriver = std::numeric_limits<uint64_t>::max()};
@@ -206,4 +207,4 @@
mCondition.notify_all();
}
-} // namespace android::hardware::neuralnetworks::V1_2::implementation
+} // namespace android::nn