Add HAL APIs for WiFi CHRE NAN RTT
1. Add new APIs to enable/disable CHRE NAN RTT
2. Add a new API to register callback.
This callback should report events from WLAN driver for CHRE.
Test: New APIs work fine
Bug: 206614765
Change-Id: I8c8ab002064a9556be2e7d3972703bb3255a3a41
diff --git a/wifi/1.6/default/hidl_callback_util.h b/wifi/1.6/default/hidl_callback_util.h
index 3ac54c1..aab0ae5 100644
--- a/wifi/1.6/default/hidl_callback_util.h
+++ b/wifi/1.6/default/hidl_callback_util.h
@@ -20,6 +20,7 @@
#include <set>
#include <hidl/HidlSupport.h>
+#include <hidl/HidlTransportSupport.h>
namespace {
// Type of callback invoked by the death handler.
@@ -68,9 +69,11 @@
// (callback proxy's raw pointer) to track the death of individual
// clients.
uint64_t cookie = reinterpret_cast<uint64_t>(cb.get());
- if (cb_set_.find(cb) != cb_set_.end()) {
- LOG(WARNING) << "Duplicate death notification registration";
- return true;
+ for (const auto& s : cb_set_) {
+ if (interfacesEqual(cb, s)) {
+ LOG(ERROR) << "Duplicate death notification registration";
+ return true;
+ }
}
if (!cb->linkToDeath(death_handler_, cookie)) {
LOG(ERROR) << "Failed to register death notification";