mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-26 08:02:47 +00:00
Do not show NetGuard traffic stats
This commit is contained in:
parent
ee78684869
commit
fae81d9109
2 changed files with 7 additions and 3 deletions
|
@ -170,6 +170,9 @@ public class Rule {
|
|||
// Build rule list
|
||||
List<Rule> listRules = new ArrayList<>();
|
||||
for (PackageInfo info : context.getPackageManager().getInstalledPackages(0)) {
|
||||
if (info.applicationInfo.uid == android.os.Process.myUid())
|
||||
continue;
|
||||
|
||||
Rule rule = new Rule(info, context);
|
||||
if (pre_system.containsKey(info.packageName))
|
||||
rule.system = pre_system.get(info.packageName);
|
||||
|
|
|
@ -467,11 +467,12 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
|||
|
||||
// Calculate application speeds
|
||||
if (prefs.getBoolean("show_top", false)) {
|
||||
if (app.size() == 0)
|
||||
if (app.size() == 0) {
|
||||
for (ApplicationInfo ainfo : getPackageManager().getInstalledApplications(0))
|
||||
if (ainfo.uid != android.os.Process.myUid())
|
||||
app.put(ainfo, TrafficStats.getUidTxBytes(ainfo.uid) + TrafficStats.getUidRxBytes(ainfo.uid));
|
||||
|
||||
else if (t > 0) {
|
||||
} else if (t > 0) {
|
||||
TreeMap<Float, ApplicationInfo> mapSpeed = new TreeMap<>(new Comparator<Float>() {
|
||||
@Override
|
||||
public int compare(Float value, Float other) {
|
||||
|
|
Loading…
Reference in a new issue