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

Unverified Commit b137fac9 authored by Ihor Ivanov's avatar Ihor Ivanov Committed by Michael Bestas
Browse files

camera2: Add methods for backward compatibility



libmcf-jni.so library (which is proprietary blob required
for MotCamera2) looks for methods with these exact signatures,
but signatures of these methods was changed in Android 11.

This change returns these methods that makes MotCamera2
fully-functional on Android 11.

Change-Id: Ib9a701f6d8ebb783c52666e34e7539faba5cb99f
Signed-off-by: default avatarIhor Ivanov <toulmee@gmail.com>
parent 9b5d27da
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1988,6 +1988,18 @@ public class CameraMetadataNative implements Parcelable {
    private static native int nativeGetTypeFromTag(int tag, long vendorId)
            throws IllegalArgumentException;

    private synchronized byte[] nativeReadValues(int tag) {
        return nativeReadValues(tag, mMetadataPtr);
    }

    private synchronized int nativeGetTypeFromTagLocal(int tag) {
        return nativeGetTypeFromTagLocal(mMetadataPtr, tag);
    }

    private synchronized int nativeGetTagFromKeyLocal(String keyname) {
        return nativeGetTagFromKeyLocal(mMetadataPtr, keyname);
    }

    /**
     * <p>Perform a 0-copy swap of the internal metadata with another object.</p>
     *