[tor-commits] [orbot/master] announce Orbot is ON once the first circuit is complete
n8fr8 at torproject.org
n8fr8 at torproject.org
Thu Jun 25 14:59:59 UTC 2015
commit ff04bde300651b6f035beae562b66278693a54d4
Author: Hans-Christoph Steiner <hans at eds.org>
Date: Fri Jun 12 14:24:57 2015 -0400
announce Orbot is ON once the first circuit is complete
Before, it was announcing tor was started when it had completed starting
the daemons. But that does not guarantee that Tor is actually connected
and working. So instead, this waits for the first circuit to be built,
then announces Tor is ON.
---
src/org/torproject/android/service/TorService.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 7e057a0..fd7bcc8 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -840,7 +840,6 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
}
shellUser.close();
- sendCallbackStatus(STATUS_ON);
} catch (CannotKillException e) {
logException(e.getMessage(), e);
showToolbarNotification(getString(R.string.unable_to_reset_tor),
@@ -1489,6 +1488,10 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
public void circuitStatus(String status, String circID, String path) {
+ /* once the first circuit is complete, then announce that Orbot is on*/
+ if (mCurrentStatus == STATUS_STARTING && TextUtils.equals(status, "BUILT"))
+ sendCallbackStatus(STATUS_ON);
+
StringBuilder sb = new StringBuilder();
sb.append("Circuit (");
sb.append((circID));
More information about the tor-commits
mailing list