diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 570f45a7..e0f87c00 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -333,7 +333,12 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere PreferenceScreen screen = getPreferenceScreen(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - // TODO: check permision for whitelist_roaming + // Check if permission was revoked + if (prefs.getBoolean("whitelist_roaming", false)) + if (!Util.hasPhoneStatePermission(this)) { + prefs.edit().putBoolean("whitelist_roaming", false).apply(); + ((TwoStatePreference) screen.findPreference("whitelist_roaming")).setChecked(false); + } // Check if permission was revoked if (prefs.getBoolean("unmetered_2g", false) ||