Skip to content

Commit

Permalink
Revert "[android] Don't include JNI_OnLoad in `libSystem.Security.C…
Browse files Browse the repository at this point in the history
…ryptography.Native.Android.a` (dotnet#103231)"

This reverts commit 048c8ed.
  • Loading branch information
matouskozak committed Jul 11, 2024
1 parent 3e294d3 commit 38e8583
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ set(NATIVECRYPTO_SOURCES

add_library(System.Security.Cryptography.Native.Android
SHARED
${NATIVECRYPTO_SOURCES} pal_jni_onload.c
${NATIVECRYPTO_SOURCES}
${VERSION_FILE_PATH}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,11 @@ int GetEnumAsInt(JNIEnv *env, jobject enumObj)
return value;
}

jint AndroidCryptoNative_InitLibraryOnLoad (JavaVM *vm, void *reserved)
JNIEXPORT jint JNICALL
JNI_OnLoad(JavaVM *vm, void *reserved)
{
(void)reserved;
LOG_DEBUG("%s in %s", __PRETTY_FUNCTION__, __FILE__);
LOG_INFO("JNI_OnLoad in pal_jni.c");
gJvm = vm;

JNIEnv* env = GetJNIEnv();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,11 +605,6 @@ jfieldID GetField(JNIEnv *env, bool isStatic, jclass klass, const char* name, co
jfieldID GetOptionalField(JNIEnv *env, bool isStatic, jclass klass, const char* name, const char* sig) ARGS_NON_NULL_ALL;
JNIEnv* GetJNIEnv(void);

// This is supposed to be called by embedders who link the **static** archive of this library.
// The function must be called from the embedder's `JNI_OnLoad` function prior to using any
// APIs in this library.
jint AndroidCryptoNative_InitLibraryOnLoad (JavaVM *vm, void *reserved);

int GetEnumAsInt(JNIEnv *env, jobject enumObj) ARGS_NON_NULL_ALL;

void* xmalloc (size_t size) __mallocfunc __BIONIC_ALLOC_SIZE(1) __wur;
Expand Down

This file was deleted.

0 comments on commit 38e8583

Please sign in to comment.