mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 05:44:14 +00:00
Reload on notify access change
This commit is contained in:
parent
7f1c438cdf
commit
8406433ce4
2 changed files with 6 additions and 2 deletions
|
@ -605,8 +605,12 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
||||||
} else if ("log_app".equals(name)) {
|
} else if ("log_app".equals(name)) {
|
||||||
Intent ruleset = new Intent(ActivityMain.ACTION_RULES_CHANGED);
|
Intent ruleset = new Intent(ActivityMain.ACTION_RULES_CHANGED);
|
||||||
LocalBroadcastManager.getInstance(this).sendBroadcast(ruleset);
|
LocalBroadcastManager.getInstance(this).sendBroadcast(ruleset);
|
||||||
|
ServiceSinkhole.reload("changed " + name, this, false);
|
||||||
|
|
||||||
} else if ("filter".equals(name)) {
|
} else if ("notify_access".equals(name))
|
||||||
|
ServiceSinkhole.reload("changed " + name, this, false);
|
||||||
|
|
||||||
|
else if ("filter".equals(name)) {
|
||||||
// Show dialog
|
// Show dialog
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && prefs.getBoolean(name, false)) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && prefs.getBoolean(name, false)) {
|
||||||
LayoutInflater inflater = LayoutInflater.from(ActivitySettings.this);
|
LayoutInflater inflater = LayoutInflater.from(ActivitySettings.this);
|
||||||
|
|
|
@ -659,8 +659,8 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> im
|
||||||
if (!checked) {
|
if (!checked) {
|
||||||
cbNotify.setChecked(false);
|
cbNotify.setChecked(false);
|
||||||
prefs.edit().putBoolean("notify_access", false).apply();
|
prefs.edit().putBoolean("notify_access", false).apply();
|
||||||
ServiceSinkhole.reload("changed notify", context, false);
|
|
||||||
}
|
}
|
||||||
|
ServiceSinkhole.reload("changed notify", context, false);
|
||||||
AdapterRule.this.notifyDataSetChanged();
|
AdapterRule.this.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue