summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2023-06-22 18:17:50 +0200
committerGitHub <noreply@github.com>2023-06-22 18:17:50 +0200
commit51dfc03805cf1c00727e2cbc69f2139b74704425 (patch)
treec5252e2fed79999d1e9dbe6a2f2c047caa2bb5b3 /Source/Android
parent6c50de06be787723b903e027abbd8dcade520369 (diff)
parent1f130bf8a3e1d8e0e135b452b709be5cb716d9bc (diff)
Merge pull request #11984 from JosJuice/android-analytics-host
Android: Declare host thread when generating analytics ID
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/jni/MainAndroid.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp
index 5741afb9d8..8724b8449e 100644
--- a/Source/Android/jni/MainAndroid.cpp
+++ b/Source/Android/jni/MainAndroid.cpp
@@ -531,12 +531,18 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(J
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReportStartToAnalytics(JNIEnv*,
jclass)
{
+ // Identity generation ends up calling config code, and some config callbacks use RunAsCPUThread
+ HostThreadLock guard;
+
DolphinAnalytics::Instance().ReportDolphinStart(GetAnalyticValue("DEVICE_TYPE"));
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GenerateNewStatisticsId(JNIEnv*,
jclass)
{
+ // Identity generation ends up calling config code, and some config callbacks use RunAsCPUThread
+ HostThreadLock guard;
+
DolphinAnalytics::Instance().GenerateNewIdentity();
}