this should be kbps in fact

This commit is contained in:
Nathan Freitas 2016-01-25 15:45:29 -05:00
parent cf1a644c19
commit ba835599f7
1 changed files with 3 additions and 2 deletions

View File

@ -1333,13 +1333,14 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
private String formatCount(long count) {
// Converts the supplied argument into a string.
// Under 2Mb, returns "xxx.xKb"
// Over 2Mb, returns "xxx.xxMb"
if (mNumberFormat != null)
if (count < 1e6)
return mNumberFormat.format(Math.round((float)((int)(count*10/1024))/10)) + "Kbps";
return mNumberFormat.format(Math.round((float)((int)(count*10/1024))/10)) + "kbps";
else
return mNumberFormat.format(Math.round((float)((int)(count*100/1024/1024))/100)) + "Mbps";
return mNumberFormat.format(Math.round((float)((int)(count*100/1024/1024))/100)) + "mbps";
else
return "";