platform_hardware_interfaces/camera
Avichal Rakesh ea30826bf3 ExternalCameraHAL: dup fd when creating AIDL NativeHandle
AIDL's NativeHandle do not have a concept of unowned file
descriptors. If a NativeHandle object is created with an
fd, NativeHandle implicitly assumes ownership of the fd.
When passing fds over binder, ExternalCameraHAL used
makeToAidl which which accidentally transferred ownership
to the AIDL objects. Additionally, NativeHandles close
owned fds on destruction, which led to multiple closure
of fences.

This CL changes the logic to use dupToAidl to ensure that
NativeHandle objects are given ownership of a duped fds
and don't interfere with any of the fds used for internal
bookkeeping.

Bug: 313115623
Test: Verified by partner that ExternalCameraHAL no longer double closes fds.
Merged-In: Ic406634de6f22a290abb414e80a7747927368b68
Change-Id: Ic406634de6f22a290abb414e80a7747927368b68
2024-03-25 21:59:11 +00:00
..
common Merge "[DON'T BLOCK] Test ownership migration rules" into main am: 27e97308c4 2024-02-07 01:45:21 +00:00
device ExternalCameraHAL: dup fd when creating AIDL NativeHandle 2024-03-25 21:59:11 +00:00
metadata Merge "[DON'T BLOCK] Test ownership migration rules" into main am: 27e97308c4 2024-02-07 01:45:21 +00:00
provider Merge "[DON'T BLOCK] Test ownership migration rules" into main am: 27e97308c4 2024-02-07 01:45:21 +00:00
OWNERS cleanup camera OWNERS 2023-01-18 21:06:05 +00:00
README.md Add pointer to default AIDL Camera HAL Implementation in README.md 2022-11-13 04:29:49 +00:00

Camera HALs


Overview:

The camera.* HAL tree is used by the Android camera service to discover and operate camera devices available on the device.

More details and versioning information can be found within each particular HAL.

More complete information about the Android camera HAL and subsystem can be found at source.android.com.

AIDL Camera HAL Interfaces

The AIDL Camera HAL interfaces can be found in the respective /aidl directories.