fix: Add @Keep
annotation to prevent minifier from deleting java funcs
This commit is contained in:
parent
7a5e879b92
commit
3007cd9430
@ -1,6 +1,7 @@
|
||||
package com.mrousavy.camera.frameprocessor
|
||||
|
||||
import android.util.Log
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.jni.HybridData
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
@ -55,6 +56,8 @@ class FrameProcessorRuntimeManager(context: ReactApplicationContext) {
|
||||
mHybridData?.resetNative()
|
||||
}
|
||||
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
fun findCameraViewById(viewId: Int): CameraView {
|
||||
Log.d(TAG, "finding view $viewId...")
|
||||
val view = mContext?.get()?.currentActivity?.findViewById<CameraView>(viewId)
|
||||
|
@ -2,12 +2,17 @@ package com.mrousavy.camera.frameprocessor;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.media.Image;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.camera.core.ImageProxy;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
public class ImageProxyUtils {
|
||||
@SuppressLint("UnsafeOptInUsageError")
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
public static boolean isImageProxyValid(ImageProxy imageProxy) {
|
||||
try {
|
||||
Image image = imageProxy.getImage();
|
||||
|
Loading…
Reference in New Issue
Block a user