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