From 64800bd8d46b0f6588f92f9a12551760fd05b010 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 25 Dec 2015 11:35:09 +0100 Subject: [PATCH] Average KB/day --- app/src/main/java/eu/faircode/netguard/RuleAdapter.java | 8 +++----- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/RuleAdapter.java b/app/src/main/java/eu/faircode/netguard/RuleAdapter.java index 46030c35..a9fdb28f 100644 --- a/app/src/main/java/eu/faircode/netguard/RuleAdapter.java +++ b/app/src/main/java/eu/faircode/netguard/RuleAdapter.java @@ -435,11 +435,9 @@ public class RuleAdapter extends RecyclerView.Adapter im // Traffic statistics holder.tvStatistics.setVisibility(debuggable ? View.VISIBLE : View.GONE); if (debuggable) - holder.tvStatistics.setText(context.getString(R.string.msg_traffic, - TrafficStats.getUidTxBytes(rule.info.applicationInfo.uid) / 1024f, - TrafficStats.getUidRxBytes(rule.info.applicationInfo.uid) / 1024f, - SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.SHORT, SimpleDateFormat.SHORT) - .format(new Date(System.currentTimeMillis() - SystemClock.elapsedRealtime())) + holder.tvStatistics.setText(context.getString(R.string.msg_kbday, + TrafficStats.getUidTxBytes(rule.info.applicationInfo.uid) / 1024f * 24 * 3600 * 1000L / SystemClock.elapsedRealtime(), + TrafficStats.getUidRxBytes(rule.info.applicationInfo.uid) / 1024f * 24 * 3600 * 1000L / SystemClock.elapsedRealtime() )); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4a2602ca..5bdd5ee9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -71,7 +71,7 @@ Since NetGuard has no internet permission, you know your internet traffic is not Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done. By donating you agree to the terms & conditions If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen. - %1$.1f/%2$.1f KiB since %3$s + ±%1$1.0f/%2$1.0f KB/day %7.3f KB/s %7.3f MB/s