Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion app/src/main/java/eu/faircode/netguard/ActivitySettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import androidx.work.PeriodicWorkRequest;
import androidx.work.WorkManager;

import net.kollnig.missioncontrol.ActivityOnboarding;
import net.kollnig.missioncontrol.BuildConfig;
import net.kollnig.missioncontrol.R;
import net.kollnig.missioncontrol.data.BlockingMode;
Expand Down Expand Up @@ -355,6 +356,16 @@ public boolean onPreferenceClick(Preference preference) {
});
}

// Handle reintroduction
Preference pref_restart_intro = screen.findPreference("reintroduction");
if (pref_restart_intro != null) {
pref_restart_intro.setOnPreferenceClickListener(preference -> {
startActivity(new Intent(ActivitySettings.this,
ActivityOnboarding.class));
return true;
});
}

// Hosts file settings
if (cat_advanced != null) {
Preference pref_use_hosts = screen.findPreference("use_hosts");
Expand Down Expand Up @@ -740,7 +751,7 @@ else if ("vpn4".equals(name)) {
ServiceSinkhole.reload("changed " + name, this, false);

} else if ("validate".equals(name)) {
String host = prefs.getString(name, "www.f-droid.org");
String host = prefs.getString(name, "wpref_ww.f-droid.org");
try {
checkDomain(host);
prefs.edit().putString(name, host.trim()).apply();
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@
<string name="setting_backup">Backup</string>
<string name="setting_export">Export settings</string>
<string name="setting_import">Import settings</string>
<string name="setting_help">Help</string>
<string name="setting_reintroduction">Restart introduction</string>
<string name="setting_hosts">Import hosts file</string>
<string name="setting_hosts_append">Import hosts file (append)</string>
<string name="setting_hosts_url">Hosts file URL</string>
Expand All @@ -168,6 +170,7 @@
<string name="summary_lan">Allow apps to connect to local area network addresses, like 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16</string>
<string name="summary_ip6">Route IP version 6 traffic to TrackerControl so it can selectively be allowed or blocked</string>
<string name="summary_call">Disable TrackerControl on incoming or outgoing telephone call. This can be used to work around IP/Wi-Fi calling problems.</string>
<string name="summary_reintroduction">View the getting started guide again</string>

<string name="summary_system">Show system apps in the app list</string>
<string name="summary_log_app">Disable to decrease battery usage. New trackers will still be blocked, but not shown.</string>
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
android:title="@string/setting_import" />
</PreferenceCategory>

<PreferenceCategory
android:key="category_help"
android:title="@string/setting_help">
<Preference
android:key="reintroduction"
android:title="@string/setting_reintroduction"
android:summary="@string/summary_reintroduction"/>
</PreferenceCategory>

<PreferenceCategory
android:title="@string/setting_further_options">

Expand Down Expand Up @@ -258,6 +267,5 @@
android:title="@string/setting_ip6" />
</PreferenceCategory>
</PreferenceScreen>

</PreferenceCategory>
</PreferenceScreen>
Loading