1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-02-26 16:13:01 +00:00

Do not show NetGuard traffic stats

This commit is contained in:
M66B 2016-01-21 17:46:31 +01:00
parent ee78684869
commit fae81d9109
2 changed files with 7 additions and 3 deletions

View file

@ -170,6 +170,9 @@ public class Rule {
// Build rule list // Build rule list
List<Rule> listRules = new ArrayList<>(); List<Rule> listRules = new ArrayList<>();
for (PackageInfo info : context.getPackageManager().getInstalledPackages(0)) { for (PackageInfo info : context.getPackageManager().getInstalledPackages(0)) {
if (info.applicationInfo.uid == android.os.Process.myUid())
continue;
Rule rule = new Rule(info, context); Rule rule = new Rule(info, context);
if (pre_system.containsKey(info.packageName)) if (pre_system.containsKey(info.packageName))
rule.system = pre_system.get(info.packageName); rule.system = pre_system.get(info.packageName);

View file

@ -467,11 +467,12 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
// Calculate application speeds // Calculate application speeds
if (prefs.getBoolean("show_top", false)) { if (prefs.getBoolean("show_top", false)) {
if (app.size() == 0) if (app.size() == 0) {
for (ApplicationInfo ainfo : getPackageManager().getInstalledApplications(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)); 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>() { TreeMap<Float, ApplicationInfo> mapSpeed = new TreeMap<>(new Comparator<Float>() {
@Override @Override
public int compare(Float value, Float other) { public int compare(Float value, Float other) {