From 841d83b3b4688c19b87cff2fbc6a72ed19ad9b1a Mon Sep 17 00:00:00 2001 From: Sathyanarayanan Gunasekaran Date: Wed, 6 Jul 2011 21:31:36 +0530 Subject: [PATCH] Bugfixes + improved formatting --- src/org/torproject/android/Orbot.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java index 6eaa124f..1b9ca85c 100644 --- a/src/org/torproject/android/Orbot.java +++ b/src/org/torproject/android/Orbot.java @@ -613,7 +613,6 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener msg.getData().putString(HANDLER_TOR_MSG, getString(R.string.status_starting_up)); mHandler.sendMessage(msg); - trafficRow.setVisibility(RelativeLayout.VISIBLE); } @@ -744,7 +743,8 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener case TorServiceConstants.MESSAGE_TRAFFIC_COUNT : - + + trafficRow.setVisibility(RelativeLayout.VISIBLE); Bundle data = msg.getData(); DataCount datacount = new DataCount(data.getLong("upload"),data.getLong("download")); downloadText.setText(formatCount(datacount.Download)); @@ -921,8 +921,8 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener // Under 2Mb, returns "xxx.xKb" // Over 2Mb, returns "xxx.xxMb" if (count < 1e6 * 2) - return ((float)((int)(count*10/1024))/10 + "kB"); - return ((float)((int)(count*100/1024/1024))/100 + "MB"); + return ((float)((int)(count*10/1024))/10 + " kbps"); + return ((float)((int)(count*100/1024/1024))/100 + " mbps"); //return count+" kB"; }