Fix: wrapPassthrough returns nullptr when HAL is extented by vendors
When an AOSP passthrough HAL (i.e. IMapper) is extended by vendors,
wrapPassthrough returned nullptr. This is because libhidlsupport.so is
in fact dual loaded; one in default linker namespace from
/system/lib/libhidlsupport.so and the other in the vndk linker namespace
from /system/lib/vndk-sp-*/libhidlsupport.so. So, there are two
BsConstructorMap objects in the two library instances. The client, which
is running in the default namespace, tries to find the descriptor name
in the former map, while the extended HAL registers itself to the latter
map.
In order to solve the problem, descriptor names of the partent types are
also tried as a fallback.
Bug: 71875003
Test: walleye boots to the UI
Test: walleye boots to the UI with an extended IMapper
Change-Id: I2b46f12ae28934f2df14067d4fccd6959973bed4
1 file changed