diff --git a/app/src/main/java/eu/faircode/netguard/AdapterRule.java b/app/src/main/java/eu/faircode/netguard/AdapterRule.java index 6ffbad99..7a5f35d3 100644 --- a/app/src/main/java/eu/faircode/netguard/AdapterRule.java +++ b/app/src/main/java/eu/faircode/netguard/AdapterRule.java @@ -397,6 +397,7 @@ public class AdapterRule extends RecyclerView.Adapter im // Apply holder.cbApply.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ? View.GONE : View.VISIBLE); + holder.cbApply.setEnabled(rule.pkg); holder.cbApply.setOnCheckedChangeListener(null); holder.cbApply.setChecked(rule.apply); holder.cbApply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { diff --git a/app/src/main/java/eu/faircode/netguard/Rule.java b/app/src/main/java/eu/faircode/netguard/Rule.java index 15af117d..ab67590e 100644 --- a/app/src/main/java/eu/faircode/netguard/Rule.java +++ b/app/src/main/java/eu/faircode/netguard/Rule.java @@ -55,6 +55,7 @@ public class Rule { public boolean internet; public boolean enabled; public Intent intent; + public boolean pkg = true; public boolean wifi_default = false; public boolean other_default = false; @@ -185,6 +186,7 @@ public class Rule { this.internet = true; this.enabled = true; this.intent = null; + this.pkg = false; } else if (info.applicationInfo.uid == 1013) { this.name = context.getString(R.string.title_mediaserver); this.description = null; @@ -192,6 +194,7 @@ public class Rule { this.internet = true; this.enabled = true; this.intent = null; + this.pkg = false; } else if (info.applicationInfo.uid == 9999) { this.name = context.getString(R.string.title_nobody); this.description = null; @@ -199,6 +202,7 @@ public class Rule { this.internet = true; this.enabled = true; this.intent = null; + this.pkg = false; } else { this.name = getLabel(info, context); this.description = getDescription(info, context);