[tbb-commits] [tor-android-service/master] Bug 40003: Setup Tor in the main thread
sysrqb at torproject.org
sysrqb at torproject.org
Tue Oct 20 23:01:51 UTC 2020
commit 972188be3819b20a4ea73692d48d238c4fb69a83
Author: Matthew Finkel <Matthew.Finkel at gmail.com>
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");
}
More information about the tbb-commits
mailing list