Current we cleverly deference "device" as part of a log message
and then immediately afterward we bother to check whether or not "device"
was NULL and whether or not it was safe to have just dereferenced it...
Change-Id: Ifcc38fbac54654fd2c6eca894af9a2a794a95f2a
The new camera interface calls set_callbacks with a pointer
to it's internal CameraDevice and expects following calls to
the callbacks to use that pointer.
Store the pointer in the camera wraper and intercept the
callbacks calls to pass it along.
Change-Id: I99f02484e12a3f72cf1be13f1c724f474a452d7f
Signed-off-by: RenanQueiroz <queirozrrq@gmail.com>
* Since the modules to HIDL 1.0 transition,
the camera stack was unable to boot properly
through camera open(...) -> close(...) -> open(...)
due to the missing release() call before close(...)
* As the newer HAL 1.0 specifications imply an internal
release(...) of the camera stack on close(...),
replicate this new behaviour by releasing the camera
resources upon close(...) if it was not performed
Change-Id: I97e1f13b7280d35df2fb17c6644b8eb203cb45ed
Signed-off-by: Adrian DC <radian.dc@gmail.com>
Signed-off-by: RenanQueiroz <queirozrrq@gmail.com>
* Get inline with the lack of CameraParametersExtra.h
support in AOSP, avoid using device header to inject
additional parameters, especially with the introduction
of Android.bp compilation for libcamera_client
which ignores the device headers override
Change-Id: I754116f55ed32d54d1b1ad44407993137a07fb69
Cameras can be opened only after the camera server has configured
them. Since Android N the framework usually tries to access the
cameras to determine whether they have a flashlight too early,
causing the flashlight tile not to work. Try to open the camera
a few times before giving up to prevent this.
Note that mm-qcamera-daemon already tries to open the camera twice
with 20ms of delay, so the total number of attempts is two times
the one defined here.
Change-Id: I664fdfdafe0829719fcd0a6a31057d761e4f07d9