Stop supporting interface_cast.

(Hw)Binder defined macros that allow you to convert
a binder object to an interface. This was implemented
by having each interface contain a descriptor, that
would be checked in case of a local interface (stub).

In HIDL, interfaces support inheritance, and therefore
having a single interface descriptor is no longer enough
to deduce what types a binder object can safely be converted
to. We can use IBase::interfaceChain() for that now, together
with the new fromBinder() support function in libhidl.

IInterface remains, to still support the conversion the other
way around: from an interface to a binder object. This can be
refactored as well, but it requires some more work on IBase.

Test: mma, hidl_test, hidl_test_java
Bug: 33173166
Change-Id: Iac5cd92713e58d2889bce84bdfd59e78f3446680
2 files changed