mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
The default External Camera HAL accidentally used `sizeof` on a `char *`
to get the length of the string. This "worked" because the string in
question "/dev/" has length of 5, while on a 32-bit system `char *`
has a size of 4. This difference of 1 was handled a few lines later.
However on 64-bit system `sizeof(char *)` returns 8 which breaks the
logic later in code.
As `sizeof` was being used as a proxy for strlen, this CL converts the
uses C++'s std::char_traits::length to determine the string lengths
at compile time.
Bug: 265168485
Test: Manually tested that the calculated length is correct after the
fix.
Change-Id: I92481a2bcb74fdbbb483ef552168debf07b2d68a
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.