Add tests for OffloadHardwareInterface
NativeHandles shouldn't be closed in OffloadHardwareInterface after
passing them to initOffload() of AIDL service, because their owner
will be changed to ParcelFileDescriptor by libbinder.
Add test cases to verify that NativeHandles are closed correctly.
NativeHandles should be closed after initOffload if:
- Init with HIDL HAL interface
- Has null NativeHandle, any non-null NativeHandles should be closed
Bug: 277834236
Test: atest OffloadHardwareInterfaceTest
Change-Id: Icbe74da73d3bdc582d1816b314fdfce9661465fc
1 file changed