The cameraservice is only registered to service manager after onFirstRef
is returned. To reduce the probability of getBinderService() call
returning null, move pingCameraServiceProxy to end of onFirstRef().
Also add debug messages in onFirstRef and main() for better diagnoses.
Test: Camera CTS
Bug: 140414594
Change-Id: I52defd1c138ade57ebc5181c42aff30921fbeaeb
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I6cc85a91afb603e31b85090917f9f3b59d82a4d1
Bug: 133508924
Bug: 138135733
android.permission.CAMERA and android.permission.SYSTEM_CAMERA are both
required by a client process to access system only cameras.
Test: Advertise the back camera as system only;
1) don't give Camera2 SYSTEM_CAMERA permissions,
Camera2 can't connect to the back camera
2) give Camera2 SYSTEM_CAMERA permissions, Camera2 successfully
connects.
3) 3P app can't connect to any camera if all cameras are
advertised as SYSTEM_ONLY_CAMERAs.
Test: CTS CameraDeviceTest, CameraManagerTest
Change-Id: I0309462f962d9c8c92564ef6781b2aae1485a933
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
<IfaceName>Default class was automatically generated, but a change in
the AIDL compiler is scheduled to generate the class only when the aidl
file is compiled with `-version` option, because the default class is
only useful for the versioned AIDL case.
Stop using ICameraServiceDefault since it will be removed. Instead use
ICameraService class instead.
Test: build
Change-Id: Ifa06e5580f62878d498d9773c81da910ee84acd1
This helps application developer be aware of availability of
postRawSensitivityBoost.
Test: Build and read docs
Bug: 119755308
Change-Id: I65778a17d98aa9a9bdbb4a452005c25dfae96950
It's possible that the following sequence happens:
1) hwbinder / binder thread T1: onResultReceived() starts -> promotes wp<CameraDevice> to sp<>;
2) Some other app thread T2 : ACameraDevice_close() -> delete ACameraDevice -> doesn't result in
CameraDevice's destructor running since mCameraDevice has another live
reference, app destroys some object O1.
3) T3 (callback looper thread): callback is received since looper is still running which accesses
dead app object O1 -> results in undefined behavior.
4) T1: onResultReceived completes and CameraDevice is destructed
We need to stop CameraDevice's looper thread (that waits for all callbacks queued to complete) in
~ACameraDevice() so we receive no callbacks after ACameraDevice is closed.
Bug: 135641415
Test: CTS native tests: no new failures
Test: AImageReaderVendorTest; enroll; while(1) auth;
Change-Id: Ia24de753f6ee409d941fff39616f09df2164880a
Merged-In: Ia24de753f6ee409d941fff39616f09df2164880a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 174084011c)
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
It's possible that the following sequence happens:
1) hwbinder / binder thread T1: onResultReceived() starts -> promotes wp<CameraDevice> to sp<>;
2) Some other app thread T2 : ACameraDevice_close() -> delete ACameraDevice -> doesn't result in
CameraDevice's destructor running since mCameraDevice has another live
reference, app destroys some object O1.
3) T3 (callback looper thread): callback is received since looper is still running which accesses
dead app object O1 -> results in undefined behavior.
4) T1: onResultReceived completes and CameraDevice is destructed
We need to stop CameraDevice's looper thread (that waits for all callbacks queued to complete) in
~ACameraDevice() so we receive no callbacks after ACameraDevice is closed.
Bug: 135641415
Test: CTS native tests: no new failures
Test: AImageReaderVendorTest; enroll; while(1) auth;
Change-Id: Ia24de753f6ee409d941fff39616f09df2164880a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
libhidltransport symbols are being moved into libhidlbase in order to
optimize linking/memory usage. libhidltransport will no longer be
required in the future (however removing references to it will come
separately).
Bug: 134961554
Test: boot
Change-Id: Ie8b9b03a53ae1f5672ce2565550768b4bcd321ee
In order for the build system to track updates to the header files
during incremental builds, always specify the src files using the same
path as the package for C++ compilations.
Bug: 112114177
Test: m
Change-Id: I5fb25124a26f190c462e2e60fc75a88d48643c10
Bug: 131925326
Test: AImageReaderVendorTest; test using vendor process using
libcamera2ndk_vendor
Change-Id: Ie86ec7f070e985121cdc89367bb0d4b227b41985
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
In some situations, clients of the vndk might need to be able to query
tags at runtime, based on tag names. For example, when client hals are
de-coupled from the camera HAL.
Bug: 131093919
Test: AImageReaderVendorTest
Test: Modify AImageReaderVendorTest to retrieve vendor tags given their
names, using ACameraMetadata_getTagFromName
Change-Id: I1cdec5b154037185e99d29be2c6890e4fdc4a32a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Allow resolutions larger or equal to 24 megapixels to stream at 10fps to
meet BURST_CAPTURE requirement.
Test: Build
Bug: 129693371
Change-Id: I8f53b6a6f725e11d9deb1505d9d63d142e971006
Its possible that the device is closing, however, it hasn't stopped its
looper yet. In that case, if we receive a callback, we'll receive a null ACameraDevice. Cache the
camera id during CallbackHandler's construction instead, like the ndk does.
Bug: 130910407
Test: AImageReaderVendorTest
Change-Id: Ia7cd40ff1ce4fe52abb5528c68e3557523a5367d
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
- RAW capability can exist for multi-camera even if physical cameras are
of different sizes/capabilities.
- FOV for all processes streams must be the same regardless of logical
or physical streams.
- All metadata tags related to pixelArray/preCorrectionActiveArray/activeArray
needs to be mapped properly by the camera HAL.
- Do distortion correction mapping for physical subcamera as well.
Test: Build and read docs, camera CTS, ITS.
Bug: 118906351
Bug: 126220135
Change-Id: I29a61fc3a603561c1d74dc2261600ce4cd3d34cd
Bug: 129979644
Test: Fake SECURE_IMAGE_DATA by updating camera characteristics in
cameraserver; Retrieve capabilities in AImageReader test and
confirm that SECURE_IMAGE_DATA is supported
Test: AImageReaderVendorTest
Change-Id: Ia105969ce1df52408e6b7663a658d89f47cd90c2
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Test: check html output of: frameworks/native/doc/make website
(with a tweak in Doxyfile to add "__ANDROID__API__=24" to
PREDEFINED)
Bug: 120916880
Change-Id: Idf93a13b9bbe2974fa4256de1f3ca67b7eee1bb6
Logical camera now doesn't mandate concurrent physical streams
combination. Instead, require is_stream_combination_required to query
whether such a combination is supported by HAL.
Test: Camera CTS, ITS
Bug: 119325664
Change-Id: I8ea7abc6fe1e34e687e86dcd1e7529d030bcc71a
The physical camera device ID must be present as part
of the capture result extras in case of corresponding
result failure notification.
Bug: 128835627
Test: Camera CTS,
AImageReaderVendorTest
--gtest_filter=AImageReaderVendorTest.LogicalCameraPhysicalStream
Change-Id: I042af8bd85eaadd389b059c2833f352ceb2f40fc
Additionally initializey the stream id to invalid negative
value in case the Hal tries to verify it during stream
combination queries.
Bug: 128450197
Test: Camera CTS
Change-Id: Ife058e22ef72ee84be82799ed397ca49cd8ea99f
Camera NDK clients must receive notifications about
access permission changes.
Bug: 121379978
Test: Camera CTS
Change-Id: I66866ee3bbf7d45619995f036f19af50e812c236
Port physical camera settings support to ndk/vndk.
Test: Related camera VTS and NDK/VNDK tests pass
Bug: 115532726
Change-Id: Ie2d46b4ec041d2cec3c02145fbf06cf70eec5ac3
Camera service listeners must be able to receive
information about camera access permission changes.
Bug: 121379978
Test: Camera CTS
Change-Id: I2e13fdd35a267901a3caa0e0ce78ab1cea83e7ab
Depth jpeg image format must be available for
native clients using the Camera NDK.
Bug: 124064032
Test: Camera CTS
Change-Id: I21f14ea63fe4a568c1cfccd0dcd32fce5cad8098
- Derive HEIC capabilities from camera HAL and media framework.
- Add HeicCompositeStream to encode camera buffers to HEIC buffers.
- Add ExifUtils to overwrite JPEG APP segments and send to media codec.
- Add NDK enums and corresponding format support.
Test: Camera CTS
Bug: 79465976
Change-Id: I0a885e76335f3eba4be0fd42241edb0b7349f284
A pointer to data within CameraMetadata can become
invalid after each metadata modification. Cache any
values that could potentially point to the raw
internal metadata buffer.
Bug: 123954417
Test: Camera CTS
Change-Id: Ie5ac9600ff454af551c4cf8e0f25ba5a6a6e897d
Add AIDL method for device-wide physical state updates (such as
folding/unfolding), and wire it up to the new camera provider HAL call.
Also clean up camera provider startup sequence - devices were being enumerated before
the new lazy HAL interface pointers were set up, resulting in many repeated calls
to getService even for a non-lazy HAL.
Also add unit test for CameraProviderManager to verify its section of
the callpath, as well as tests to check that the provider HAL and
hardware service manager aren't queried more than expected during
initialization.
Test: atest cameraservice_test
Change-Id: I5ec60fd9d93b7a2fe4d1a5854fad720a972fe8ea
Composite dynamic depth streams will be supported
in case camera devices include:
- Dense depth streams which are not exclusive.
- Jpeg/Blob output with sizes that either match depth
or are with similar aspect ratio.
Make a guesstimate regarding the dynamic depth minimum
frame and stall durations.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: I8a89c7895cf57ce4408e41b1afae9c85d48c4e07
The support inclues:
- Physical camera specific stream support,
- Physical camera result metadata, and
Test: Newly added NDK CTS test pass
Test: Newly added VNDK test pass
Bug: 120566141
Bug: 115532726
Change-Id: I939b81522ca6c518c0e54ded5d3615f9973a6a65