mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-28 10:51:14 +00:00
Faster related packages
This commit is contained in:
parent
9f0cf42983
commit
2d5302d215
1 changed files with 5 additions and 6 deletions
|
@ -404,11 +404,10 @@ public class Rule {
|
||||||
List<String> listPkg = new ArrayList<>();
|
List<String> listPkg = new ArrayList<>();
|
||||||
if (pre_related.containsKey(info.packageName))
|
if (pre_related.containsKey(info.packageName))
|
||||||
listPkg.addAll(Arrays.asList(pre_related.get(info.packageName)));
|
listPkg.addAll(Arrays.asList(pre_related.get(info.packageName)));
|
||||||
String[] pkgs = getPackages(info.applicationInfo.uid, context);
|
for (PackageInfo pi : listPI)
|
||||||
if (pkgs != null && pkgs.length > 1) {
|
if (pi.applicationInfo.uid == rule.uid && !pi.packageName.equals(rule.packageName)) {
|
||||||
rule.relateduids = true;
|
rule.relateduids = true;
|
||||||
listPkg.addAll(Arrays.asList(pkgs));
|
listPkg.add(pi.packageName);
|
||||||
listPkg.remove(info.packageName);
|
|
||||||
}
|
}
|
||||||
rule.related = listPkg.toArray(new String[0]);
|
rule.related = listPkg.toArray(new String[0]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue