Instead of requiring the user to call NewGlobalRef/DeleteGlobalRef
for keeping the java object alive when creating an NDK view into it,
reference count the real native data instead, so that there's no need
to keep track of the Java object lifecycle.
- Switch CameraMetadataNative to use std::shared_ptr internally
- Switch ACameraMetadata to use std::shared_ptr internally
- Always copy data in the ACameraMetadata copy constructor
Test: New CTS tests pass, fail without this CL
Bug: 148972471
Change-Id: I40a0ccb8b40c7a89ee7d3a6f7bac7c9c88d709f1
Root cause was that jclass instances acquired from JNIEnv::FindClass are
not pinned and become invalidated due to Java garbage collection. Adding
a new global ref pins the pointer.
FIXED=148174094
Test: atest android.hardware.camera2.cts.CameraManagerTest#testCameraCharacteristicsNdkFromSdk android.hardware.camera2.cts.CaptureResultTest#testCameraCaptureResultAllKeys
Test: atest NativeCameraDeviceTest NativeCameraManagerTest NativeImageReaderTest NativeStillCaptureTest
Change-Id: Id0601b9c01e1a58485e3b039a87a5cf56a19e0af
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
To fix the warning in RefBase destructor.
Test: NDK CTS tests, and ARCore measure app.
Bug: 112775599
Change-Id: Ia448ac6d7e6c17699c16d287f65fc2826c9d7578
Move libmediandk and libcamera2ndk headers into their module
and export them from there. Also move them to the same path
relative to the export as used in the NDK, media/ for
libmediandk and camera/ for libcamera2ndk.
Test: builds
Change-Id: I0b424e0e48bfb5e2b762694a97d799de08f5dda3