Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5419ea37 authored by Jiawen Chen's avatar Jiawen Chen
Browse files

Add methods to retrieve the native CameraMetadata pointer.

Test: atest android.hardware.camera2.cts.CameraManagerTest#testCameraCharacteristicsNdkFromSdk android.hardware.camera2.cts.CaptureResultTest#testCameraCaptureResultAllKeys
Bug: 80513080

Change-Id: I296db8425b562e09843159dfab3afa0960b4854f
parent 1035b49a
Loading
Loading
Loading
Loading
+23 −9
Original line number Diff line number Diff line
@@ -94,6 +94,20 @@ public abstract class CameraMetadata<TKey> {
        mNativeInstance = nativeInstance;
    }

    /**
     * Retrieves the native CameraMetadata* as a Java long.
     * Returns 0 if mNativeInstance is null.
     *
     * @hide
     */
    public long getNativeMetadataPtr() {
        if (mNativeInstance == null) {
            return 0;
        } else {
            return mNativeInstance.getMetadataPtr();
        }
    }

    /**
     * @hide
     */
+9 −0
Original line number Diff line number Diff line
@@ -1702,6 +1702,15 @@ public class CameraMetadataNative implements Parcelable {
    }


    /**
     * Retrieves the pointer to the native CameraMetadata as a Java long.
     *
     * @hide
     */
    public long getMetadataPtr() {
        return mMetadataPtr;
    }

    /**
     * Return a list containing keys of the given key class for all defined vendor tags.
     *