Skip to content

Commit

Permalink
prefs/Syncthing: Add "Anonymous crash reporting" checkbox (fixes #421) (
Browse files Browse the repository at this point in the history
#425)

* model/Options: Add crash*, stun* and unackedNotificationID

* ConfigXml: Dismiss unackedNotificationID "crAutoEnabled"

* ConfigXml/getOptions: Add unackedNotificationID, crash*, stun*

* prefs/Syncthing: Add "Anonymous crash reporting" checkbox (fixes #421)

* Imported de translation
  • Loading branch information
Catfriend1 authored Jun 16, 2019
1 parent d1f9bdf commit 090cb19
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public static class SettingsFragment extends PreferenceFragment
private CheckBoxPreference mWebUIRemoteAccess;
private CheckBoxPreference mRestartOnWakeup;
private CheckBoxPreference mUrAccepted;
private CheckBoxPreference mCrashReportingEnabled;
private CheckBoxPreference mWebUIDebugging;
private Preference mDownloadSupportBundle;

Expand Down Expand Up @@ -342,6 +343,7 @@ public void onActivityCreated(Bundle savedInstanceState) {
mSyncthingApiKey = findPreference(KEY_SYNCTHING_API_KEY);
mRestartOnWakeup = (CheckBoxPreference) findPreference("restartOnWakeup");
mUrAccepted = (CheckBoxPreference) findPreference("urAccepted");
mCrashReportingEnabled = (CheckBoxPreference) findPreference("crashReportingEnabled");
mWebUIDebugging = (CheckBoxPreference) findPreference(KEY_WEBUI_DEBUGGING);
mDownloadSupportBundle = findPreference(KEY_DOWNLOAD_SUPPORT_BUNDLE);
Preference undoIgnoredDevicesFolders = findPreference(KEY_UNDO_IGNORED_DEVICES_FOLDERS);
Expand Down Expand Up @@ -540,6 +542,7 @@ public void onServiceStateChange(SyncthingService.State currentState) {
mGlobalAnnounceServers.setText(joiner.join(mOptions.globalAnnounceServers));
mRestartOnWakeup.setChecked(mOptions.restartOnWakeup);
mUrAccepted.setChecked(mRestApi.isUsageReportingAccepted());
mCrashReportingEnabled.setChecked(mOptions.crashReportingEnabled);
}

// Web GUI tcp port and bind ip address.
Expand Down Expand Up @@ -706,6 +709,9 @@ public boolean onSyncthingPreferenceChange(Preference preference, Object o) {
mRestApi.setUsageReporting((boolean) o);
mOptions = mRestApi.getOptions();
break;
case "crashReportingEnabled":
mOptions.crashReportingEnabled = (boolean) o;
break;
case KEY_WEBUI_DEBUGGING:
mGui.debugging = (boolean) o;

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ Bitte melden Sie auftretende Probleme via GitHub.</string>

<string name="usage_reporting">Anonymer Nutzungsbericht</string>

<string name="crash_reporting">Anonymer Absturzbericht</string>

<string name="webui_tcp_port_title">Web UI TCP Port</string>

<string name="webui_remote_access_title">Web UI Fernzugriff</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ Please report any problems you encounter via Github.</string>

<string name="usage_reporting">Anonymous Usage Reporting</string>

<string name="crash_reporting">Anonymous Crash Reporting</string>

<string name="webui_tcp_port_title">Web UI TCP Port</string>

<string name="webui_remote_access_title">Web UI remote access</string>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/xml/app_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@
android:title="@string/usage_reporting"
android:persistent="false" />

<CheckBoxPreference
android:key="crashReportingEnabled"
android:title="@string/crash_reporting"
android:persistent="false" />

<CheckBoxPreference
android:key="webUIDebugging"
android:title="@string/webui_debugging_title"
Expand Down

0 comments on commit 090cb19

Please sign in to comment.