Skip to content
Permalink
Browse files
Merge pull request #9303 from Ebola16/AStat
Android: Add "Generate a New Statistics Identity"
  • Loading branch information
lioncash committed Dec 2, 2020
2 parents 5abae61 + aaafb9b commit 00f2e0e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
@@ -375,6 +375,8 @@ public static native void SetMotionSensorsEnabled(boolean accelerometerEnabled,
*/
public static native void ReportStartToAnalytics();

public static native void GenerateNewStatisticsId();

/**
* Begins emulation.
*/
@@ -238,6 +238,8 @@ private void addGeneralSettings(ArrayList<SettingsItem> sl)
sl.add(new PercentSliderSetting(FloatSetting.MAIN_EMULATION_SPEED, R.string.speed_limit, 0, 0,
200, "%"));
sl.add(new CheckBoxSetting(BooleanSetting.MAIN_ANALYTICS_ENABLED, R.string.analytics, 0));
sl.add(new RunRunnable(R.string.analytics_new_id, 0, R.string.analytics_new_id_confirmation, 0,
NativeLibrary::GenerateNewStatisticsId));
sl.add(new CheckBoxSetting(BooleanSetting.MAIN_ENABLE_SAVESTATES, R.string.enable_save_states,
R.string.enable_save_states_description));
}
@@ -158,6 +158,8 @@
<string name="lock_emulation_landscape_desc">Some touch controls will require additional tweaking if played in portrait</string>
<string name="analytics">Enable usage statistics reporting</string>
<string name="analytics_desc">If authorized, Dolphin can collect data on its performance, feature usage, and configuration, as well as data on your system\'s hardware and operating system.\n\nNo private data is ever collected. This data helps us understand how people and emulated games use Dolphin and prioritize our efforts. It also helps us identify rare configurations that are causing bugs, performance and stability issues. This authorization can be revoked at any time through Dolphin\'s settings.</string>
<string name="analytics_new_id">Generate a New Statistics Identity</string>
<string name="analytics_new_id_confirmation">Are you sure you want to generate a new statistics identity?</string>

<!-- Interface Preference Fragment -->
<string name="interface_submenu">Interface</string>
@@ -469,6 +469,12 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReportStartT
DolphinAnalytics::Instance().ReportDolphinStart(GetAnalyticValue("DEVICE_TYPE"));
}

JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GenerateNewStatisticsId(JNIEnv*,
jclass)
{
DolphinAnalytics::Instance().GenerateNewIdentity();
}

// Returns the scale factor for imgui rendering.
// Based on the scaledDensity of the device's display metrics.
static float GetRenderSurfaceScale(JNIEnv* env)

0 comments on commit 00f2e0e

Please sign in to comment.