HwBinder: don't re-implement libhidl's getService
Rather than re-implementing getService in the JNI backend
for HIDL Java classes, we call the implementation in libhidl.
This does several good things:
- prevents frameworks/base/core from depending on PRODUCT_FULL_TREBLE
- prevents frameworks/base/core from having any user vs. userdebug differences
- ensures there are no subtle differences between C++ and Java getService
- removes essentially copy/pasted code
- unlocks the door to provide 'getService' 'tryGetService' semantics in Java
(b/67981006)
Has the side effect of making passthrough mode kind work in Java, but
still with parcelling to transition between the ABIs:
- getRawServiceInternal returns passthrough service
- toBinder wraps that service in Bn*
- in-process binder calls are made in the same process
Test: device boots + hidl_test_java
Bug: 67974907
Change-Id: Ie459f95eb8a059f578f703d1f73ca42417cfeeb8
2 files changed