From fa1cea7ca817e5a48ae7537441cf8a5cc13b2a60 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 Jul 2016 14:36:47 +0200 Subject: [PATCH] Remove setting to show top applications in speed graph (Android N) Doesn't work in Android N anymore --- app/src/main/java/eu/faircode/netguard/ActivitySettings.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 10c83dbd..4b987719 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -130,6 +130,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere PreferenceGroup cat_options = (PreferenceGroup) ((PreferenceGroup) screen.findPreference("screen_options")).findPreference("category_options"); PreferenceGroup cat_advanced = (PreferenceGroup) ((PreferenceGroup) screen.findPreference("screen_advanced_options")).findPreference("category_advanced_options"); + PreferenceGroup cat_stats = (PreferenceGroup) ((PreferenceGroup) screen.findPreference("screen_stats")).findPreference("category_stats"); PreferenceGroup cat_backup = (PreferenceGroup) ((PreferenceGroup) screen.findPreference("screen_backup")).findPreference("category_backup"); PreferenceGroup cat_development = (PreferenceGroup) ((PreferenceGroup) screen.findPreference("screen_development")).findPreference("category_development"); @@ -231,6 +232,8 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere screen.findPreference("pcap_file_size").setTitle(getString(R.string.setting_pcap_file_size, prefs.getString("pcap_file_size", "2"))); // Handle stats + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) + cat_stats.removePreference(screen.findPreference("show_top")); EditTextPreference pref_stats_frequency = (EditTextPreference) screen.findPreference("stats_frequency"); EditTextPreference pref_stats_samples = (EditTextPreference) screen.findPreference("stats_samples"); pref_stats_frequency.setTitle(getString(R.string.setting_stats_frequency, prefs.getString("stats_frequency", "1000")));