From 090cb19dd19f83e424165707e9a649ead6128c9c Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Sun, 16 Jun 2019 18:58:14 +0200 Subject: [PATCH] prefs/Syncthing: Add "Anonymous crash reporting" checkbox (fixes #421) (#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 --- .../syncthingandroid/activities/SettingsActivity.java | 6 ++++++ app/src/main/res/values-de/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/app_settings.xml | 5 +++++ 4 files changed, 15 insertions(+) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java index e9e0141f..f7471529 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java @@ -195,6 +195,7 @@ public class SettingsActivity extends SyncthingActivity { private CheckBoxPreference mWebUIRemoteAccess; private CheckBoxPreference mRestartOnWakeup; private CheckBoxPreference mUrAccepted; + private CheckBoxPreference mCrashReportingEnabled; private CheckBoxPreference mWebUIDebugging; private Preference mDownloadSupportBundle; @@ -342,6 +343,7 @@ public class SettingsActivity extends SyncthingActivity { 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); @@ -540,6 +542,7 @@ public class SettingsActivity extends SyncthingActivity { 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. @@ -706,6 +709,9 @@ public class SettingsActivity extends SyncthingActivity { mRestApi.setUsageReporting((boolean) o); mOptions = mRestApi.getOptions(); break; + case "crashReportingEnabled": + mOptions.crashReportingEnabled = (boolean) o; + break; case KEY_WEBUI_DEBUGGING: mGui.debugging = (boolean) o; diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 99b22aac..0ca763d0 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -526,6 +526,8 @@ Bitte melden Sie auftretende Probleme via GitHub. Anonymer Nutzungsbericht + Anonymer Absturzbericht + Web UI TCP Port Web UI Fernzugriff diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7003876a..2ce0fbf5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -529,6 +529,8 @@ Please report any problems you encounter via Github. Anonymous Usage Reporting + Anonymous Crash Reporting + Web UI TCP Port Web UI remote access diff --git a/app/src/main/res/xml/app_settings.xml b/app/src/main/res/xml/app_settings.xml index 4b063e31..f8eeebd8 100644 --- a/app/src/main/res/xml/app_settings.xml +++ b/app/src/main/res/xml/app_settings.xml @@ -223,6 +223,11 @@ android:title="@string/usage_reporting" android:persistent="false" /> + +