From 92fbd45f4e17d12e609a54a9c016622d0496408f Mon Sep 17 00:00:00 2001 From: Sathyanarayanan Gunasekaran Date: Mon, 25 Jul 2011 17:49:03 -0400 Subject: [PATCH] Adding neccessary prep code for Total BW --- src/org/torproject/android/service/TorService.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java index a4b01712..01c693c2 100644 --- a/src/org/torproject/android/service/TorService.java +++ b/src/org/torproject/android/service/TorService.java @@ -1109,7 +1109,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst } } - + public void bandwidthUsed(long read, long written) { if (ENABLE_DEBUG_LOG) @@ -1120,7 +1120,14 @@ public class TorService extends Service implements TorServiceConstants, TorConst sb.append("kb read / "); sb.append(written/1000); sb.append("kb written"); - + /* try { + sb.append("Total upload :"+conn.getInfo("traffic/written")); + sb.append("Total Download "+conn.getInfo("traffic/read")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + */ logNotice(sb.toString()); }