feat: Add context
to VisionCameraProxy
(#2545)
This commit is contained in:
parent
0ed3aed48a
commit
24f43efa35
@ -14,7 +14,7 @@ import com.mrousavy.camera.core.ViewNotFoundError
|
|||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
|
|
||||||
@Suppress("KotlinJniMissingFunction") // we use fbjni.
|
@Suppress("KotlinJniMissingFunction") // we use fbjni.
|
||||||
class VisionCameraProxy(context: ReactApplicationContext) {
|
class VisionCameraProxy(private val reactContext: ReactApplicationContext) {
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "VisionCameraProxy"
|
const val TAG = "VisionCameraProxy"
|
||||||
}
|
}
|
||||||
@ -24,6 +24,8 @@ class VisionCameraProxy(context: ReactApplicationContext) {
|
|||||||
private var mHybridData: HybridData
|
private var mHybridData: HybridData
|
||||||
private var mContext: WeakReference<ReactApplicationContext>
|
private var mContext: WeakReference<ReactApplicationContext>
|
||||||
private var mScheduler: VisionCameraScheduler
|
private var mScheduler: VisionCameraScheduler
|
||||||
|
val context: ReactApplicationContext
|
||||||
|
get() = reactContext
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val jsCallInvokerHolder = context.catalystInstance.jsCallInvokerHolder as CallInvokerHolderImpl
|
val jsCallInvokerHolder = context.catalystInstance.jsCallInvokerHolder as CallInvokerHolderImpl
|
||||||
|
Loading…
Reference in New Issue
Block a user