diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 91e7e942..c7e18f46 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -77,15 +77,11 @@
-
getFirstStartTime() + USAGE_REPORTING_DIALOG_DELAY);
RestApi restApi = getApi();
- if (usageReportingDelayPassed && restApi != null && restApi.isConfigLoaded() && !restApi.isUsageReportingDecided()) {
+ if ( (
+ DEBUG_FORCE_USAGE_REPORTING_DIALOG
+ ) || (
+ usageReportingDelayPassed &&
+ restApi != null &&
+ restApi.isConfigLoaded() &&
+ !restApi.isUsageReportingDecided()
+ )) {
showUsageReportingDialog(restApi);
}
break;
@@ -525,8 +534,9 @@ public class MainActivity extends SyncthingActivity
restApi.saveConfigAndRestart();
break;
case DialogInterface.BUTTON_NEUTRAL:
- Uri uri = Uri.parse("https://data.syncthing.net");
- startActivity(new Intent(Intent.ACTION_VIEW, uri));
+ final Intent intent = new Intent(MainActivity.this, WebViewActivity.class);
+ intent.putExtra(WebViewActivity.EXTRA_WEB_URL, getString(R.string.syncthing_usage_stats_url));
+ startActivity(intent);
break;
}
} catch (Exception e) {
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 646cb72c..c1f2cc40 100644
--- a/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java
+++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/SettingsActivity.java
@@ -42,6 +42,7 @@ import com.google.common.base.Splitter;
import com.google.common.collect.Iterables;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.SyncthingApp;
+import com.nutomic.syncthingandroid.activities.WebViewActivity;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.model.Gui;
import com.nutomic.syncthingandroid.model.Options;
@@ -137,6 +138,7 @@ public class SettingsActivity extends SyncthingActivity {
private static final String KEY_EXPORT_CONFIG = "export_config";
private static final String KEY_IMPORT_CONFIG = "import_config";
// Settings/Debug
+ private static final String KEY_OPEN_ISSUE_TRACKER = "open_issue_tracker";
private static final String KEY_ST_RESET_DATABASE = "st_reset_database";
private static final String KEY_ST_RESET_DELTAS = "st_reset_deltas";
// Settings/About
@@ -322,17 +324,19 @@ public class SettingsActivity extends SyncthingActivity {
importConfig.setOnPreferenceClickListener(this);
/* Debugging */
+ Preference openIssueTracker = findPreference(KEY_OPEN_ISSUE_TRACKER);
Preference debugFacilitiesEnabled = findPreference(Constants.PREF_DEBUG_FACILITIES_ENABLED);
Preference environmentVariables = findPreference("environment_variables");
Preference stResetDatabase = findPreference("st_reset_database");
Preference stResetDeltas = findPreference("st_reset_deltas");
+ openIssueTracker.setOnPreferenceClickListener(this);
debugFacilitiesEnabled.setOnPreferenceChangeListener(this);
environmentVariables.setOnPreferenceChangeListener(this);
stResetDatabase.setOnPreferenceClickListener(this);
stResetDeltas.setOnPreferenceClickListener(this);
- screen.findPreference("open_issue_tracker").setSummary(getString(R.string.open_issue_tracker_summary, getString(R.string.issue_tracker_url)));
+ screen.findPreference(KEY_OPEN_ISSUE_TRACKER).setSummary(getString(R.string.open_issue_tracker_summary, getString(R.string.issue_tracker_url)));
/* Experimental options */
mUseTor = (CheckBoxPreference) findPreference(Constants.PREF_USE_TOR);
@@ -711,6 +715,11 @@ public class SettingsActivity extends SyncthingActivity {
mPendingConfig = true;
}
return true;
+ case KEY_OPEN_ISSUE_TRACKER:
+ intent = new Intent(getActivity(), WebViewActivity.class);
+ intent.putExtra(WebViewActivity.EXTRA_WEB_URL, getString(R.string.issue_tracker_url));
+ startActivity(intent);
+ return true;
case KEY_EXPORT_CONFIG:
new AlertDialog.Builder(getActivity())
.setMessage(R.string.dialog_confirm_export)
diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/WebViewActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/WebViewActivity.java
index 5b7eb0e4..bb2c2c59 100644
--- a/app/src/main/java/com/nutomic/syncthingandroid/activities/WebViewActivity.java
+++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/WebViewActivity.java
@@ -26,6 +26,9 @@ import com.nutomic.syncthingandroid.util.Util;
*/
public class WebViewActivity extends SyncthingActivity {
+ public static final String EXTRA_WEB_URL =
+ "com.github.catfriend1.syncthingandroid.activities.WebViewActivity.WEB_URL";
+
private static final String TAG = "WebViewActivity";
private AlertDialog mSecurityNoticeDialog;
@@ -91,7 +94,13 @@ public class WebViewActivity extends SyncthingActivity {
super.onCreate(savedInstanceState);
isRunningOnTV = Util.isRunningOnTV(WebViewActivity.this);
setContentView(R.layout.activity_web_gui);
- webPageUrl = getString(R.string.issue_tracker_url);
+
+ if (!getIntent().hasExtra(EXTRA_WEB_URL)) {
+ Log.e(TAG, "EXTRA_WEB_URL not set.");
+ finish();
+ }
+ webPageUrl = getIntent().getStringExtra(EXTRA_WEB_URL);
+
mLoadingView = findViewById(R.id.loading);
((TextView) findViewById(R.id.loading_text)).setText(getString(R.string.web_page_loading, webPageUrl));
mWebView = findViewById(R.id.webview);
@@ -129,6 +138,9 @@ public class WebViewActivity extends SyncthingActivity {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ return true;
case R.id.openBrowser:
// This can only be triggered on a non-TV device.
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(webPageUrl)));
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 76f45722..0db5ce3c 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -371,7 +371,7 @@ Bitte melden Sie auftretende Probleme via GitHub.
Verhalten
Syncthing-Optionen
Import und Export
- Fehleranalyse
+ Fehlerbehebung
Experimentell
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c83c37e5..e3bc8eb1 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -89,6 +89,9 @@ Please report any problems you encounter via Github.
Open Website
+
+ https://data.syncthing.net
+
Write storage permission is required for this app
Device \"%1$s\" wants to connect
@@ -371,7 +374,7 @@ Please report any problems you encounter via Github.
Behaviour
Syncthing Options
Import and Export
- Debug
+ Troubleshooting
Experimental
diff --git a/app/src/main/res/xml/app_settings.xml b/app/src/main/res/xml/app_settings.xml
index 6194beda..0d777245 100644
--- a/app/src/main/res/xml/app_settings.xml
+++ b/app/src/main/res/xml/app_settings.xml
@@ -196,10 +196,12 @@
@@ -211,8 +213,6 @@
android:key="open_issue_tracker"
android:persistent="false"
android:title="@string/report_issue_title">
-