Skip to content

Commit 161e8a7

Browse files
Meetouljavelinanddart
authored andcommitted
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: Ihor Ivanov <toulmee@gmail.com>
1 parent 2e9288e commit 161e8a7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

core/java/android/hardware/camera2/impl/CameraMetadataNative.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,6 +1758,18 @@ private static native int nativeGetTagFromKey(String keyName, long vendorId)
17581758
private static native int nativeGetTypeFromTag(int tag, long vendorId)
17591759
throws IllegalArgumentException;
17601760

1761+
private synchronized byte[] nativeReadValues(int tag) {
1762+
return nativeReadValues(tag, mMetadataPtr);
1763+
}
1764+
1765+
private synchronized int nativeGetTypeFromTagLocal(int tag) {
1766+
return nativeGetTypeFromTagLocal(mMetadataPtr, tag);
1767+
}
1768+
1769+
private synchronized int nativeGetTagFromKeyLocal(String keyname) {
1770+
return nativeGetTagFromKeyLocal(mMetadataPtr, keyname);
1771+
}
1772+
17611773
/**
17621774
* <p>Perform a 0-copy swap of the internal metadata with another object.</p>
17631775
*

0 commit comments

Comments
 (0)