diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/NativeFeatureModuleImpl.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/NativeFeatureModuleImpl.kt index ddff67779..6af0c8d69 100644 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/NativeFeatureModuleImpl.kt +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/NativeFeatureModuleImpl.kt @@ -10,8 +10,8 @@ import io.embrace.android.embracesdk.internal.ndk.EmbraceNdkService import io.embrace.android.embracesdk.internal.ndk.EmbraceNdkServiceRepository import io.embrace.android.embracesdk.internal.ndk.NativeCrashDataSourceImpl import io.embrace.android.embracesdk.internal.ndk.NativeCrashService -import io.embrace.android.embracesdk.internal.ndk.NdkDelegateImpl import io.embrace.android.embracesdk.internal.ndk.NdkService +import io.embrace.android.embracesdk.internal.ndk.jni.JniDelegateImpl import io.embrace.android.embracesdk.internal.worker.Worker internal class NativeFeatureModuleImpl( @@ -39,7 +39,7 @@ internal class NativeFeatureModuleImpl( nativeCoreModule.sharedObjectLoader, initModule.logger, embraceNdkServiceRepository, - NdkDelegateImpl(), + JniDelegateImpl(), workerThreadModule.backgroundWorker(Worker.Background.IoRegWorker), payloadSourceModule.deviceArchitecture, initModule.jsonSerializer diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkService.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkService.kt index e580ef38e..cb46bd992 100644 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkService.kt +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkService.kt @@ -17,6 +17,7 @@ import io.embrace.android.embracesdk.internal.config.ConfigService import io.embrace.android.embracesdk.internal.crash.CrashFileMarkerImpl import io.embrace.android.embracesdk.internal.logging.EmbLogger import io.embrace.android.embracesdk.internal.logging.InternalErrorType +import io.embrace.android.embracesdk.internal.ndk.jni.JniDelegate import io.embrace.android.embracesdk.internal.payload.AppFramework import io.embrace.android.embracesdk.internal.payload.NativeCrashData import io.embrace.android.embracesdk.internal.payload.NativeCrashDataError @@ -47,7 +48,7 @@ internal class EmbraceNdkService( private val sharedObjectLoader: SharedObjectLoader, private val logger: EmbLogger, private val repository: NdkServiceRepository, - private val delegate: NdkServiceDelegate.NdkDelegate, + private val delegate: JniDelegate, private val backgroundWorker: BackgroundWorker, private val deviceArchitecture: DeviceArchitecture, private val serializer: PlatformSerializer, @@ -81,7 +82,7 @@ internal class EmbraceNdkService( override fun updateSessionId(newSessionId: String) { if (sharedObjectLoader.loaded.get()) { - delegate._updateSessionId(newSessionId) + delegate.updateSessionId(newSessionId) } } @@ -126,12 +127,12 @@ internal class EmbraceNdkService( private fun checkSignalHandlersOverwritten() { if (configService.autoDataCaptureBehavior.is3rdPartySigHandlerDetectionEnabled()) { - val culprit = delegate._checkForOverwrittenHandlers() + val culprit = delegate.checkForOverwrittenHandlers() if (culprit != null) { if (shouldIgnoreOverriddenHandler(culprit)) { return } - delegate._reinstallSignalHandlers() + delegate.reinstallSignalHandlers() } } } @@ -167,7 +168,7 @@ internal class EmbraceNdkService( val nativeCrashId: String = unityCrashId ?: Uuid.getEmbUuid() val is32bit = deviceArchitecture.is32BitDevice Systrace.traceSynchronous("native-install-handlers") { - delegate._installSignalHandlers( + delegate.installSignalHandlers( reportBasePath, markerFilePath, sessionIdProvider(), @@ -189,7 +190,7 @@ internal class EmbraceNdkService( private fun getNativeCrashErrors(errorFile: File?): List? { if (errorFile != null) { val absolutePath = errorFile.absolutePath - val errorsRaw = delegate._getErrors(absolutePath) + val errorsRaw = delegate.getErrors(absolutePath) if (errorsRaw != null) { runCatching { val type = TypeUtils.typedList(NativeCrashDataError::class) @@ -230,7 +231,7 @@ internal class EmbraceNdkService( for (crashFile in matchingFiles) { try { val path = crashFile.path - delegate._getCrashReport(path)?.let { crashRaw -> + delegate.getCrashReport(path)?.let { crashRaw -> val nativeCrash = serializer.fromJson(crashRaw, NativeCrashData::class.java) val errorFile = repository.errorFileForCrash(crashFile)?.apply { getNativeCrashErrors(this).let { errors -> @@ -302,7 +303,7 @@ internal class EmbraceNdkService( private fun updateAppState(newAppState: String) { if (sharedObjectLoader.loaded.get()) { - delegate._updateAppState(newAppState) + delegate.updateAppState(newAppState) } } @@ -316,7 +317,7 @@ internal class EmbraceNdkService( if (json.length >= EMB_DEVICE_META_DATA_SIZE) { json = serializeMetadata(src.copy(sessionProperties = null)) } - delegate._updateMetaData(json) + delegate.updateMetaData(json) } } diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/NdkDelegateImpl.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/NdkDelegateImpl.kt deleted file mode 100644 index a6d76c204..000000000 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/NdkDelegateImpl.kt +++ /dev/null @@ -1,23 +0,0 @@ -package io.embrace.android.embracesdk.internal.ndk - -@Suppress("UnusedPrivateClass") -class NdkDelegateImpl : NdkServiceDelegate.NdkDelegate { - external override fun _installSignalHandlers( - report_path: String?, - markerFilePath: String?, - session_id: String?, - app_state: String?, - report_id: String?, - api_level: Int, - is_32bit: Boolean, - dev_logging: Boolean, - ) - - external override fun _updateMetaData(new_device_meta_data: String?) - external override fun _updateSessionId(new_session_id: String?) - external override fun _updateAppState(new_app_state: String?) - external override fun _getCrashReport(path: String?): String? - external override fun _getErrors(path: String?): String? - external override fun _checkForOverwrittenHandlers(): String? - external override fun _reinstallSignalHandlers(): Boolean -} diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/NdkServiceDelegate.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/NdkServiceDelegate.kt deleted file mode 100644 index 785669673..000000000 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/NdkServiceDelegate.kt +++ /dev/null @@ -1,24 +0,0 @@ -package io.embrace.android.embracesdk.internal.ndk - -internal class NdkServiceDelegate { - interface NdkDelegate { - fun _installSignalHandlers( - report_path: String?, - markerFilePath: String?, - session_id: String?, - app_state: String?, - report_id: String?, - api_level: Int, - is_32bit: Boolean, - dev_logging: Boolean, - ) - - fun _updateMetaData(new_device_meta_data: String?) - fun _updateSessionId(new_session_id: String?) - fun _updateAppState(new_app_state: String?) - fun _getCrashReport(path: String?): String? - fun _getErrors(path: String?): String? - fun _checkForOverwrittenHandlers(): String? - fun _reinstallSignalHandlers(): Boolean - } -} diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/jni/JniDelegate.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/jni/JniDelegate.kt new file mode 100644 index 000000000..d814e9ceb --- /dev/null +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/jni/JniDelegate.kt @@ -0,0 +1,21 @@ +package io.embrace.android.embracesdk.internal.ndk.jni + +internal interface JniDelegate { + fun installSignalHandlers( + reportPath: String?, + markerFilePath: String?, + sessionId: String?, + appState: String?, + reportId: String?, + apiLevel: Int, + is32bit: Boolean, + devLogging: Boolean, + ) + fun updateMetaData(metadata: String?) + fun updateSessionId(sessionId: String?) + fun updateAppState(appState: String?) + fun getCrashReport(path: String?): String? + fun getErrors(path: String?): String? + fun checkForOverwrittenHandlers(): String? + fun reinstallSignalHandlers(): Boolean +} diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/jni/JniDelegateImpl.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/jni/JniDelegateImpl.kt new file mode 100644 index 000000000..2cd1cc885 --- /dev/null +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/ndk/jni/JniDelegateImpl.kt @@ -0,0 +1,22 @@ +package io.embrace.android.embracesdk.internal.ndk.jni + +class JniDelegateImpl : JniDelegate { + external override fun installSignalHandlers( + reportPath: String?, + markerFilePath: String?, + sessionId: String?, + appState: String?, + reportId: String?, + apiLevel: Int, + is32bit: Boolean, + devLogging: Boolean, + ) + + external override fun updateMetaData(metadata: String?) + external override fun updateSessionId(sessionId: String?) + external override fun updateAppState(appState: String?) + external override fun getCrashReport(path: String?): String? + external override fun getErrors(path: String?): String? + external override fun checkForOverwrittenHandlers(): String? + external override fun reinstallSignalHandlers(): Boolean +} diff --git a/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkServiceTest.kt b/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkServiceTest.kt index 502d0658f..4f6cd5c6f 100644 --- a/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkServiceTest.kt +++ b/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/ndk/EmbraceNdkServiceTest.kt @@ -25,6 +25,7 @@ import io.embrace.android.embracesdk.internal.capture.metadata.MetadataService import io.embrace.android.embracesdk.internal.crash.CrashFileMarkerImpl import io.embrace.android.embracesdk.internal.logging.EmbLogger import io.embrace.android.embracesdk.internal.logging.EmbLoggerImpl +import io.embrace.android.embracesdk.internal.ndk.jni.JniDelegate import io.embrace.android.embracesdk.internal.payload.AppFramework import io.embrace.android.embracesdk.internal.payload.NativeCrashMetadata import io.embrace.android.embracesdk.internal.serialization.EmbraceSerializer @@ -79,7 +80,7 @@ internal class EmbraceNdkServiceTest { private lateinit var sessionPropertiesService: FakeSessionPropertiesService private lateinit var sharedObjectLoader: FakeSharedObjectLoader private lateinit var logger: EmbLogger - private lateinit var delegate: NdkServiceDelegate.NdkDelegate + private lateinit var delegate: JniDelegate private lateinit var repository: FakeNdkServiceRepository private lateinit var resources: Resources private lateinit var blockableExecutorService: BlockableExecutorService @@ -177,14 +178,14 @@ internal class EmbraceNdkServiceTest { fun `test updateSessionId where installSignals was executed and isInstalled true`() { initializeService() embraceNdkService.updateSessionId("sessionId") - verify(exactly = 1) { delegate._updateSessionId("sessionId") } + verify(exactly = 1) { delegate.updateSessionId("sessionId") } } @Test fun `test onBackground runs _updateAppState when _updateMetaData was executed and isInstalled true`() { initializeService() embraceNdkService.onBackground(0L) - verify(exactly = 1) { delegate._updateAppState("background") } + verify(exactly = 1) { delegate.updateAppState("background") } } @Test @@ -200,7 +201,7 @@ internal class EmbraceNdkServiceTest { ) val expected = serializer.toJson(newDeviceMetaData) - verify { delegate._updateMetaData(expected) } + verify { delegate.updateMetaData(expected) } } @Test @@ -216,7 +217,7 @@ internal class EmbraceNdkServiceTest { val markerFilePath = storageManager.filesDirectory.absolutePath + "/" + CrashFileMarkerImpl.CRASH_MARKER_FILE_NAME verify(exactly = 1) { - delegate._installSignalHandlers( + delegate.installSignalHandlers( reportBasePath, markerFilePath, "null", @@ -237,7 +238,7 @@ internal class EmbraceNdkServiceTest { ) ) - verify(exactly = 1) { delegate._updateMetaData(newDeviceMetaData) } + verify(exactly = 1) { delegate.updateMetaData(newDeviceMetaData) } assertEquals(embraceNdkService.unityCrashId, Uuid.getEmbUuid()) } @@ -253,7 +254,7 @@ internal class EmbraceNdkServiceTest { storageManager.filesDirectory.absolutePath + "/" + CrashFileMarkerImpl.CRASH_MARKER_FILE_NAME verifyOrder { - delegate._installSignalHandlers( + delegate.installSignalHandlers( reportBasePath, markerFilePath, "null", @@ -263,7 +264,7 @@ internal class EmbraceNdkServiceTest { deviceArchitecture.is32BitDevice, false ) - delegate._updateMetaData(any()) + delegate.updateMetaData(any()) } } @@ -289,14 +290,14 @@ internal class EmbraceNdkServiceTest { ) val expected = serializer.toJson(newDeviceMetaData) - verify { delegate._updateMetaData(expected) } + verify { delegate.updateMetaData(expected) } } @Test fun `test onForeground runs _updateAppState when _updateMetaData was executed and isInstalled true`() { initializeService() embraceNdkService.onForeground(true, 10) - verify(exactly = 1) { delegate._updateAppState("foreground") } + verify(exactly = 1) { delegate.updateAppState("foreground") } } @Test @@ -304,7 +305,7 @@ internal class EmbraceNdkServiceTest { initializeService() val result = embraceNdkService.getLatestNativeCrash() assertNull(result) - verify(exactly = 0) { delegate._getCrashReport(any()) } + verify(exactly = 0) { delegate.getCrashReport(any()) } } @Test @@ -337,7 +338,7 @@ internal class EmbraceNdkServiceTest { " }\n" + " ]\n" + "}" - every { delegate._getCrashReport(any()) } returns json + every { delegate.getCrashReport(any()) } returns json initializeService() val crashData = embraceNdkService.getLatestNativeCrash() @@ -349,7 +350,7 @@ internal class EmbraceNdkServiceTest { repository.addCrashFiles( nativeCrashFile = File.createTempFile("test", "crash-test") ) - every { delegate._getCrashReport(any()) } returns getNativeCrashRaw() + every { delegate.getCrashReport(any()) } returns getNativeCrashRaw() configService.appFramework = AppFramework.UNITY @@ -390,7 +391,7 @@ internal class EmbraceNdkServiceTest { @Test fun `getNativeCrashes returns all the crashes in the repository and doesn't invoke delete`() { - every { delegate._getCrashReport(any()) } returns getNativeCrashRaw() + every { delegate.getCrashReport(any()) } returns getNativeCrashRaw() initializeService() repository.addCrashFiles(File.createTempFile("file1", "tmp")) repository.addCrashFiles(File.createTempFile("file2", "temp")) @@ -400,7 +401,7 @@ internal class EmbraceNdkServiceTest { @Test fun `getLatestNativeCrash returns only one crash even if there are many and deletes them all`() { - every { delegate._getCrashReport(any()) } returns getNativeCrashRaw() + every { delegate.getCrashReport(any()) } returns getNativeCrashRaw() initializeService() repository.addCrashFiles(File.createTempFile("file1", "tmp")) repository.addCrashFiles(File.createTempFile("file2", "temp")) @@ -410,7 +411,7 @@ internal class EmbraceNdkServiceTest { private fun assertNativeSignalHandlerInstalled() { verify(exactly = 1) { - delegate._installSignalHandlers( + delegate.installSignalHandlers( any(), any(), any(), diff --git a/embrace-android-sdk/embrace-proguard.cfg b/embrace-android-sdk/embrace-proguard.cfg index 6c37a6bd3..a30089cb7 100644 --- a/embrace-android-sdk/embrace-proguard.cfg +++ b/embrace-android-sdk/embrace-proguard.cfg @@ -23,7 +23,7 @@ ## Keep classes with JNI calls to native code -keep class io.embrace.android.embracesdk.internal.anr.ndk.NativeThreadSamplerNdkDelegate { *; } --keep class io.embrace.android.embracesdk.internal.ndk.NdkDelegateImpl { *; } +-keep class io.embrace.android.embracesdk.internal.ndk.jni.JniDelegateImpl { *; } ## OpenTelemetry Java SDK -keep class io.opentelemetry.api.trace.StatusCode { *; } diff --git a/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/NdkJniInterfaceTest.kt b/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/NdkJniInterfaceTest.kt index 72ffe0ffd..df6c8910c 100644 --- a/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/NdkJniInterfaceTest.kt +++ b/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/NdkJniInterfaceTest.kt @@ -1,6 +1,6 @@ package io.embrace.android.embracesdk.ndk.jni -import io.embrace.android.embracesdk.internal.ndk.NdkDelegateImpl +import io.embrace.android.embracesdk.internal.ndk.jni.JniDelegateImpl import io.embrace.android.embracesdk.ndk.NativeTestSuite import org.junit.Assert.assertEquals import org.junit.Before @@ -8,12 +8,12 @@ import org.junit.Test internal class NdkJniInterfaceTest : NativeTestSuite() { - private val ndkDelegate = NdkDelegateImpl() + private val delegate = JniDelegateImpl() @Before fun setUp() { // install signal handlers first so we can test the other methods without race conditions - val result = ndkDelegate._installSignalHandlers( + val result = delegate.installSignalHandlers( "report_path", "markerFilePath", "null", @@ -29,43 +29,43 @@ internal class NdkJniInterfaceTest : NativeTestSuite() { @Test fun updateMetaDataTest() { - val result = ndkDelegate._updateMetaData("new_device_meta_data") + val result = delegate.updateMetaData("new_device_meta_data") assertEquals(Unit.javaClass, result.javaClass) } @Test fun updateSessionIdTest() { - val result = ndkDelegate._updateSessionId("new_session_id") + val result = delegate.updateSessionId("new_session_id") assertEquals(Unit.javaClass, result.javaClass) } @Test fun updateAppStateTest() { - val result = ndkDelegate._updateAppState("new_app_state") + val result = delegate.updateAppState("new_app_state") assertEquals(Unit.javaClass, result.javaClass) } @Test fun getCrashReportTest() { - val result = ndkDelegate._getCrashReport("path") + val result = delegate.getCrashReport("path") assertEquals(null, result) } @Test fun getErrorsTest() { - val result = ndkDelegate._getErrors("path") + val result = delegate.getErrors("path") assertEquals(null, result) } @Test fun checkForOverwrittenHandlersTest() { - val result = ndkDelegate._checkForOverwrittenHandlers() + val result = delegate.checkForOverwrittenHandlers() assertEquals(null, result) } @Test fun reinstallSignalHandlersTest() { - val result = ndkDelegate._reinstallSignalHandlers() + val result = delegate.reinstallSignalHandlers() assertEquals(false, result) } } diff --git a/embrace-android-sdk/src/main/cpp/jnibridge/emb_ndk_manager.c b/embrace-android-sdk/src/main/cpp/jnibridge/emb_ndk_manager.c index 0c83f1bc6..e26691029 100644 --- a/embrace-android-sdk/src/main/cpp/jnibridge/emb_ndk_manager.c +++ b/embrace-android-sdk/src/main/cpp/jnibridge/emb_ndk_manager.c @@ -31,16 +31,16 @@ static emb_env __impl_emb_env = {0}; static emb_env *__emb_env = &__impl_emb_env; JNIEXPORT void JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1installSignalHandlers(JNIEnv *env, - jobject thiz, - jstring _base_path, - jstring _crash_marker_path, - jstring _session_id, - jstring _app_state, - jstring _report_id, - jint api_level, - jboolean is_32bit, - jboolean dev_logging) { +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_installSignalHandlers(JNIEnv *env, + jobject thiz, + jstring _base_path, + jstring _crash_marker_path, + jstring _session_id, + jstring _app_state, + jstring _report_id, + jint api_level, + jboolean is_32bit, + jboolean dev_logging) { if (dev_logging) { emb_enable_dev_logging(); } @@ -96,9 +96,9 @@ Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1installSignalH } JNIEXPORT void JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1updateMetaData(JNIEnv *env, - jobject thiz, - jstring _device_meta_data) { +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_updateMetaData(JNIEnv *env, + jobject thiz, + jstring _device_meta_data) { const char *device_meta_data = (*env)->GetStringUTFChars(env, _device_meta_data, 0); if (strlen(device_meta_data) >= EMB_DEVICE_META_DATA_SIZE) { @@ -110,24 +110,24 @@ Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1updateMetaData } JNIEXPORT void JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1updateSessionId(JNIEnv *env, - jobject thiz, - jstring _session_id) { +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_updateSessionId(JNIEnv *env, + jobject thiz, + jstring _session_id) { const char *session_id = (*env)->GetStringUTFChars(env, _session_id, 0); snprintf(__emb_env->crash.session_id, EMB_SESSION_ID_SIZE, "%s", session_id); emb_set_report_paths(__emb_env, session_id); } JNIEXPORT void JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1updateAppState(JNIEnv *env, - jobject thiz, - jstring _app_state) { +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_updateAppState(JNIEnv *env, + jobject thiz, + jstring _app_state) { const char *app_state = (*env)->GetStringUTFChars(env, _app_state, 0); snprintf(__emb_env->crash.app_state, EMB_APP_DATA_SIZE, "%s", app_state); } JNIEXPORT jstring JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1getCrashReport( +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_getCrashReport( JNIEnv *env, jobject _this, jstring _report_path) { EMB_LOGDEV("Called getCrashReport()."); static pthread_mutex_t crash_reader_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -182,7 +182,7 @@ Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1getCrashReport JNIEXPORT jstring JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1getErrors( +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_getErrors( JNIEnv *env, jobject _this, jstring _report_path) { EMB_LOGDEV("Called getErrors()."); static pthread_mutex_t error_reader_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -260,8 +260,8 @@ Java_io_embrace_android_embracesdk_internal_anr_ndk_NativeThreadSamplerNdkDelega } JNIEXPORT jstring JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1checkForOverwrittenHandlers(JNIEnv *env, - jobject thiz) { +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_checkForOverwrittenHandlers(JNIEnv *env, + jobject thiz) { char buffer[WARNING_LOG_BUFFER_SIZE]; EMB_LOGINFO("Checking for Overwritten handlers"); if (emb_check_for_overwritten_handlers(buffer, WARNING_LOG_BUFFER_SIZE)) { @@ -272,8 +272,8 @@ Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1checkForOverwr } JNIEXPORT jboolean JNICALL -Java_io_embrace_android_embracesdk_internal_ndk_NdkDelegateImpl__1reinstallSignalHandlers(JNIEnv *env, - jobject thiz) { +Java_io_embrace_android_embracesdk_internal_ndk_jni_JniDelegateImpl_reinstallSignalHandlers(JNIEnv *env, + jobject thiz) { EMB_LOGINFO("About to reinstall 3rd party handlers"); // install signal handlers