summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2018-02-08 05:10:44 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-02-08 05:10:44 +0000
commit6273014e677026f23a0c55712ce0de91a167c9df (patch)
tree14574938ca5b99d2359489738599b4eac1b84075
parent1fbc991e9c9d62f3876381ad5649a0a896c8039a (diff)
parent2714254936fcca994165000ed841daa7092899a0 (diff)
downloadlibhidl-6273014e677026f23a0c55712ce0de91a167c9df.tar.gz
Merge "Reland "Remove gBn/sConstructorMap."" am: 425c3d92e3 am: bb39ffe202
am: 2714254936 Change-Id: I4fe2cf2884e92b4630a2d90d03d55537d0b91b10
-rw-r--r--transport/HidlPassthroughSupport.cpp3
-rw-r--r--transport/Static.cpp6
-rw-r--r--transport/include/hidl/HidlBinderSupport.h5
-rw-r--r--transport/include/hidl/Static.h4
4 files changed, 1 insertions, 17 deletions
diff --git a/transport/HidlPassthroughSupport.cpp b/transport/HidlPassthroughSupport.cpp
index e5eb164..d7903bd 100644
--- a/transport/HidlPassthroughSupport.cpp
+++ b/transport/HidlPassthroughSupport.cpp
@@ -27,9 +27,6 @@ namespace details {
static sp<IBase> tryWrap(const std::string& descriptor, sp<IBase> iface) {
auto func = getBsConstructorMap().get(descriptor, nullptr);
- if (!func) {
- func = gBsConstructorMap.get(descriptor, nullptr);
- }
if (func) {
return func(static_cast<void*>(iface.get()));
}
diff --git a/transport/Static.cpp b/transport/Static.cpp
index cbe6add..aa1ac42 100644
--- a/transport/Static.cpp
+++ b/transport/Static.cpp
@@ -29,17 +29,11 @@ namespace details {
Mutex gDefaultServiceManagerLock;
sp<android::hidl::manager::V1_0::IServiceManager> gDefaultServiceManager;
-// Deprecated; kept for ABI compatibility. Use getBnConstructorMap.
-BnConstructorMap gBnConstructorMap{};
-
ConcurrentMap<const ::android::hidl::base::V1_0::IBase*, wp<::android::hardware::BHwBinder>>
gBnMap{};
ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, SchedPrio> gServicePrioMap{};
-// Deprecated; kept for ABI compatibility. Use getBsConstructorMap.
-BsConstructorMap gBsConstructorMap{};
-
// For static executables, it is not guaranteed that gBnConstructorMap are initialized before
// used in HAL definition libraries.
BnConstructorMap& getBnConstructorMap() {
diff --git a/transport/include/hidl/HidlBinderSupport.h b/transport/include/hidl/HidlBinderSupport.h
index 9759af1..55003cc 100644
--- a/transport/include/hidl/HidlBinderSupport.h
+++ b/transport/include/hidl/HidlBinderSupport.h
@@ -332,10 +332,7 @@ sp<IBinder> toBinder(sp<IType> iface) {
if (sBnObj == nullptr) {
auto func = details::getBnConstructorMap().get(myDescriptor, nullptr);
if (!func) {
- func = details::gBnConstructorMap.get(myDescriptor, nullptr);
- if (!func) {
- return nullptr;
- }
+ return nullptr;
}
sBnObj = sp<IBinder>(func(static_cast<void*>(ifacePtr)));
diff --git a/transport/include/hidl/Static.h b/transport/include/hidl/Static.h
index 0522e44..9d9a14a 100644
--- a/transport/include/hidl/Static.h
+++ b/transport/include/hidl/Static.h
@@ -44,8 +44,6 @@ using BnConstructorMap = ConcurrentMap<std::string, std::function<sp<IBinder>(vo
// For HidlBinderSupport and autogenerated code
// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
// returns sp<IBinder>
-// deprecated; use getBnConstructorMap instead.
-extern BnConstructorMap gBnConstructorMap;
BnConstructorMap& getBnConstructorMap();
using BsConstructorMap = ConcurrentMap<std::string,
@@ -53,8 +51,6 @@ using BsConstructorMap = ConcurrentMap<std::string,
// For HidlPassthroughSupport and autogenerated code
// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
// returns sp<IBase>
-// deprecated; use getBsConstructorMap instead.
-extern BsConstructorMap gBsConstructorMap;
BsConstructorMap& getBsConstructorMap();
} // namespace details
} // namespace hardware