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.
This commit is contained in:
parent
b620f828a1
commit
ff04bde300
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue