Revert "Revert "Allow proxies to be compared.""

This reverts commit 7c238ef97977204a5a5ff65a39f602ceb44ed307.

(originally reverted due to merge conflicts)

Bug: 32172906
Test: hidl_test

Change-Id: I590c60ed529847742dede590e1e9a152a7650da0
diff --git a/transport/include/hidl/Static.h b/transport/include/hidl/Static.h
index 0133ff7..63b06fe 100644
--- a/transport/include/hidl/Static.h
+++ b/transport/include/hidl/Static.h
@@ -22,6 +22,7 @@
 #include <android/hidl/base/1.0/IBase.h>
 #include <hidl/ConcurrentMap.h>
 #include <hwbinder/IBinder.h>
+#include <hwbinder/IInterface.h>
 #include <utils/StrongPointer.h>
 
 namespace android {
@@ -33,14 +34,18 @@
     int prio;
 };
 
+extern ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, SchedPrio> gServicePrioMap;
+
+// For HidlBinderSupport and autogenerated code
+extern ConcurrentMap<const ::android::hidl::base::V1_0::IBase*, wp<::android::hardware::BHwBinder>>
+    gBnMap;
+
 // For HidlBinderSupport and autogenerated code
 // value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
 // returns sp<IBinder>
 extern ConcurrentMap<std::string,
         std::function<sp<IBinder>(void *)>> gBnConstructorMap;
 
-extern ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, SchedPrio> gServicePrioMap;
-
 // For HidlPassthroughSupport and autogenerated code
 // value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
 // returns sp<IBase>