Prevent out of range

This commit is contained in:
M66B 2015-12-26 08:41:45 +01:00
parent e1584445d8
commit b33de15840
1 changed files with 2 additions and 2 deletions

View File

@ -432,8 +432,8 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
// Traffic statistics
holder.tvStatistics.setText(context.getString(R.string.msg_mbday,
TrafficStats.getUidTxBytes(rule.info.applicationInfo.uid) * 24 * 3600 * 1000L / 1024f / 1024f / SystemClock.elapsedRealtime(),
TrafficStats.getUidRxBytes(rule.info.applicationInfo.uid) * 24 * 3600 * 1000L / 1024f / 1024f / SystemClock.elapsedRealtime()
(float) TrafficStats.getUidTxBytes(rule.info.applicationInfo.uid) * 24 * 3600 * 1000 / 1024f / 1024f / SystemClock.elapsedRealtime(),
(float) TrafficStats.getUidRxBytes(rule.info.applicationInfo.uid) * 24 * 3600 * 1000 / 1024f / 1024f / SystemClock.elapsedRealtime()
));
}