getCoreApi

open fun getCoreApi(context: Context): CoreApi

Get the CoreApi, lazily creating one if none has been set.

Thread-safe: concurrent callers from different threads (e.g. a prewarm IO thread doing the construction while the main thread races into the activity lifecycle) all observe the same instance. The synchronized block prevents the duplicate-construction race that would otherwise load the JNI library twice / open the DB handle twice.