summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fietz <Martin.Fietz@gmail.com>2016-03-15 14:10:15 +0100
committerMartin Fietz <Martin.Fietz@gmail.com>2016-03-18 23:22:23 +0100
commit466e6003b53296682a180b8360a3577424a51049 (patch)
treed3c07a89b7eab389d2d9e88d7856a815c5629084
parent2c4aaea708c1b541f801c8b731336173ad38482c (diff)
downloadAntennaPod-466e6003b53296682a180b8360a3577424a51049.zip
Link to known issues/bugs in Settings
-rw-r--r--app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java18
-rw-r--r--app/src/main/res/xml/preferences.xml3
-rw-r--r--core/src/main/res/values/strings.xml2
3 files changed, 21 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
index 152412089..d8d263313 100644
--- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
+++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
@@ -4,6 +4,7 @@ import android.Manifest;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.TimePickerDialog;
+import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -86,6 +87,8 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
public static final String PREF_GPODNET_HOSTNAME = "pref_gpodnet_hostname";
public static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
public static final String PREF_PROXY = "prefProxy";
+ public static final String PREF_KNOWN_ISSUES = "prefKnownIssues";
+ public static final String PREF_SEND_CRASH_REPORT = "prefSendCrashReport";
private final PreferenceUI ui;
@@ -373,7 +376,18 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
dialog.createDialog().show();
return true;
});
- ui.findPreference("prefSendCrashReport").setOnPreferenceClickListener(preference -> {
+ ui.findPreference(PREF_KNOWN_ISSUES).setOnPreferenceClickListener(preference -> {
+ String url = "https://github.com/AntennaPod/AntennaPod/labels/bug";
+ try {
+ Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+ ui.getActivity().startActivity(myIntent);
+ } catch (ActivityNotFoundException e) {
+ Toast.makeText(ui.getActivity(), R.string.pref_no_browser_found, Toast.LENGTH_LONG).show();
+ Log.e(TAG, Log.getStackTraceString(e));
+ }
+ return true;
+ });
+ ui.findPreference(PREF_SEND_CRASH_REPORT).setOnPreferenceClickListener(preference -> {
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"Martin.Fietz@gmail.com"});
@@ -532,7 +546,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
ui.findPreference(UserPreferences.PREF_ENABLE_AUTODL_WIFI_FILTER).setEnabled(autoDownload);
setSelectedNetworksEnabled(autoDownload && UserPreferences.isEnableAutodownloadWifiFilter());
- ui.findPreference("prefSendCrashReport").setEnabled(CrashReportWriter.getFile().exists());
+ ui.findPreference(PREF_SEND_CRASH_REPORT).setEnabled(CrashReportWriter.getFile().exists());
if (Build.VERSION.SDK_INT >= 16) {
ui.findPreference(UserPreferences.PREF_SONIC).setEnabled(true);
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index e0671e67b..6001ade6b 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -272,6 +272,9 @@
android:key="prefAbout"
android:title="@string/about_pref"/>
<Preference
+ android:key="prefKnownIssues"
+ android:title="@string/pref_known_issues"/>
+ <Preference
android:key="prefSendCrashReport"
android:title="@string/crash_report_title"
android:summary="@string/crash_report_sum"/>
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index a94c9ad2d..5b3ce4013 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -394,6 +394,8 @@
<string name="pref_current_value">Current value: %1$s</string>
<string name="pref_proxy_title">Proxy</string>
<string name="pref_proxy_sum">Set a network proxy</string>
+ <string name="pref_known_issues">Known issues</string>
+ <string name="pref_no_browser_found">No web browser found."</string>
<!-- Auto-Flattr dialog -->
<string name="auto_flattr_enable">Enable automatic flattring</string>