From 28ed03f617ede34c31f07919245bcf89145ebdda Mon Sep 17 00:00:00 2001 From: Francisco Prieto Date: Mon, 22 Jul 2024 12:07:32 -0300 Subject: [PATCH] Fix cpuinfo.c JNI call to address the correct package --- embrace-android-sdk/src/main/cpp/utils/cpuinfo.c | 4 ++-- .../embracesdk/internal/capture/cpu/EmbraceCpuInfoDelegate.kt | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/embrace-android-sdk/src/main/cpp/utils/cpuinfo.c b/embrace-android-sdk/src/main/cpp/utils/cpuinfo.c index 84a237b4e6..bbbc54cb76 100644 --- a/embrace-android-sdk/src/main/cpp/utils/cpuinfo.c +++ b/embrace-android-sdk/src/main/cpp/utils/cpuinfo.c @@ -26,11 +26,11 @@ jstring emb_get_property(JNIEnv *env, const char* key) { } JNIEXPORT jstring JNICALL -Java_io_embrace_android_embracesdk_capture_cpu_EmbraceCpuInfoDelegate_getNativeCpuName(JNIEnv* env, jobject thiz) { +Java_io_embrace_android_embracesdk_internal_capture_cpu_EmbraceCpuInfoDelegate_getNativeCpuName(JNIEnv* env, jobject thiz) { return emb_get_property(env, CPUINFO_CPU_NAME_KEY); } JNIEXPORT jstring JNICALL -Java_io_embrace_android_embracesdk_capture_cpu_EmbraceCpuInfoDelegate_getNativeEgl(JNIEnv* env, jobject thiz) { +Java_io_embrace_android_embracesdk_internal_capture_cpu_EmbraceCpuInfoDelegate_getNativeEgl(JNIEnv* env, jobject thiz) { return emb_get_property(env, CPUINFO_EGL_KEY); } diff --git a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/capture/cpu/EmbraceCpuInfoDelegate.kt b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/capture/cpu/EmbraceCpuInfoDelegate.kt index 5694afd49b..05d426d96c 100644 --- a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/capture/cpu/EmbraceCpuInfoDelegate.kt +++ b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/capture/cpu/EmbraceCpuInfoDelegate.kt @@ -3,6 +3,10 @@ package io.embrace.android.embracesdk.internal.capture.cpu import io.embrace.android.embracesdk.internal.SharedObjectLoader import io.embrace.android.embracesdk.internal.logging.EmbLogger +/** + * This class is responsible for getting the CPU name and EGL name from the native library. + * Make sure to update the JNI call in cpuinfo.c with any method or package name changes. + */ internal class EmbraceCpuInfoDelegate( private val sharedObjectLoader: SharedObjectLoader, private val logger: EmbLogger