[tor-commits] [orbot/master] Bugfixes + improved formatting

n8fr8 at torproject.org n8fr8 at torproject.org
Mon Oct 1 07:41:26 UTC 2012


commit 841d83b3b4688c19b87cff2fbc6a72ed19ad9b1a
Author: Sathyanarayanan Gunasekaran <gsathya.ceg at gmail.com>
Date:   Wed Jul 6 21:31:36 2011 +0530

    Bugfixes + improved formatting
---
 src/org/torproject/android/Orbot.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index 6eaa124..1b9ca85 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";
 	}





More information about the tor-commits mailing list