Skip to content

Commit

Permalink
Merge pull request #11984 from JosJuice/android-analytics-host
Browse files Browse the repository at this point in the history
Android: Declare host thread when generating analytics ID
  • Loading branch information
JosJuice committed Jun 22, 2023
2 parents 6c50de0 + 1f130bf commit 51dfc03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Android/jni/MainAndroid.cpp
Expand Up @@ -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();
}

Expand Down

0 comments on commit 51dfc03

Please sign in to comment.