[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-android-service/master] Bug 40003: Setup Tor in the main thread
commit 8213c8dc9868dead7c3b2e34c80d29934939e2ee
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date: Thu Oct 15 02:50:59 2020 +0000
Bug 40003: Setup Tor in the main thread
---
.../main/java/org/torproject/android/service/TorService.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/service/src/main/java/org/torproject/android/service/TorService.java b/service/src/main/java/org/torproject/android/service/TorService.java
index 971c2e9..f1ddcda 100644
--- a/service/src/main/java/org/torproject/android/service/TorService.java
+++ b/service/src/main/java/org/torproject/android/service/TorService.java
@@ -234,13 +234,10 @@ public final class TorService extends Service implements TorServiceConstants, Or
mActionBroadcastReceiver = new ActionBroadcastReceiver();
registerReceiver(mActionBroadcastReceiver, new IntentFilter(CMD_NEWNYM));
- new Thread(new Runnable() {
- public void run() {
- if (setupTor()) {
- notifyIfConnectedToTorNetwork();
- }
- }
- }).start();
+ if (setupTor()) {
+ mEventBroadcaster.broadcastNotice("Preparing Tor, please wait...");
+ notifyIfConnectedToTorNetwork();
+ }
Log.i("TorService", "onCreate end");
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits