Make avg/day public

This commit is contained in:
M66B 2015-12-25 19:55:42 +01:00
parent a3201f5e80
commit 9e532466c9
2 changed files with 5 additions and 10 deletions

View File

@ -53,10 +53,7 @@ import android.widget.TextView;
import com.squareup.picasso.Picasso;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> implements Filterable {
@ -434,12 +431,10 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
});
// Traffic statistics
holder.tvStatistics.setVisibility(debuggable ? View.VISIBLE : View.GONE);
if (debuggable)
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()
));
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()
));
}
private void updateRule(Rule rule, String network, boolean blocked) {

View File

@ -72,7 +72,7 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_voluntary">Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done.</string>
<string name="msg_terms">By donating you agree to the <a href="http://www.netguard.me/#terms">terms &amp; conditions</a></string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_kbday" translatable="false">&#177;%1$1.0f/%2$1.0f KB/day</string>
<string name="msg_kbday">&#177; %1$1.0f&#9650; %2$1.0f&#9660; KB/day</string>
<string name="msg_kbsec">%7.3f KB/s</string>
<string name="msg_mbsec">%7.3f MB/s</string>