mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-02-05 10:58:50 -06:00
Android: Use the shared HTTP analytics backend
We can now route Android analytics through Common::HttpAnalyticsBackend, drop the Volley sender, and keep the JNI layer limited to only transfer metadata since https://bugs.dolphin-emu.org/issues/11772 has been fixed.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <fmt/format.h>
|
||||
#include <jni.h>
|
||||
|
||||
#include "Common/AndroidAnalytics.h"
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
@@ -221,24 +220,6 @@ static bool MsgAlert(const char* caption, const char* text, bool yes_no, Common:
|
||||
return result != JNI_FALSE;
|
||||
}
|
||||
|
||||
static void ReportSend(const std::string& endpoint, const std::string& report)
|
||||
{
|
||||
JNIEnv* env = IDCache::GetEnvForThread();
|
||||
|
||||
jbyteArray output_array = env->NewByteArray(report.size());
|
||||
jbyte* output = env->GetByteArrayElements(output_array, nullptr);
|
||||
memcpy(output, report.data(), report.size());
|
||||
env->ReleaseByteArrayElements(output_array, output, 0);
|
||||
|
||||
jstring j_endpoint = ToJString(env, endpoint);
|
||||
|
||||
env->CallStaticVoidMethod(IDCache::GetAnalyticsClass(), IDCache::GetSendAnalyticsReport(),
|
||||
j_endpoint, output_array);
|
||||
|
||||
env->DeleteLocalRef(output_array);
|
||||
env->DeleteLocalRef(j_endpoint);
|
||||
}
|
||||
|
||||
static std::string GetAnalyticValue(const std::string& key)
|
||||
{
|
||||
JNIEnv* env = IDCache::GetEnvForThread();
|
||||
@@ -565,7 +546,6 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(J
|
||||
|
||||
UICommon::CreateDirectories();
|
||||
Common::RegisterMsgAlertHandler(&MsgAlert);
|
||||
Common::AndroidSetReportHandler(&ReportSend);
|
||||
DolphinAnalytics::AndroidSetGetValFunc(&GetAnalyticValue);
|
||||
|
||||
WiimoteReal::InitAdapterClass();
|
||||
|
||||
Reference in New Issue
Block a user