1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-27 02:09:41 +00:00

Show all application for port forwarding

Fixes #335
This commit is contained in:
M66B 2016-02-20 11:07:36 +01:00
parent df6c43517d
commit a1b5bb802d
2 changed files with 3 additions and 3 deletions

View file

@ -165,7 +165,7 @@ public class ActivityForwarding extends AppCompatActivity {
@Override
protected List<Rule> doInBackground(Object... objects) {
return Rule.getRules(false, ActivityForwarding.this);
return Rule.getRules(true, ActivityForwarding.this);
}
@Override

View file

@ -121,7 +121,7 @@ public class Rule {
}
}
public static List<Rule> getRules(boolean all, Context context) {
public static List<Rule> getRules(final boolean all, Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences wifi = context.getSharedPreferences("wifi", Context.MODE_PRIVATE);
SharedPreferences other = context.getSharedPreferences("other", Context.MODE_PRIVATE);
@ -288,7 +288,7 @@ public class Rule {
Collections.sort(listRules, new Comparator<Rule>() {
@Override
public int compare(Rule rule, Rule other) {
if (rule.changed == other.changed) {
if (all || rule.changed == other.changed) {
Collator collator = Collator.getInstance(Locale.getDefault());
collator.setStrength(Collator.SECONDARY); // Case sensitive, process accents etc
int i = collator.compare(rule.name, other.name);