commit d6f5720f270778a9026f20b72da37bcc0362e3b1
Author: Nathan Freitas <nat...@freitas.net>
Date:   Wed Jun 4 23:52:28 2014 -0400

    remove synchronized - not needed, and causing blocking
---
 src/org/torproject/android/service/TorService.java |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/org/torproject/android/service/TorService.java 
b/src/org/torproject/android/service/TorService.java
index ff219f2..81453f1 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -1002,17 +1002,18 @@ public class TorService extends Service implements 
TorServiceConstants, TorConst
                }
                
                
-               public synchronized void setTorProfile(int profile)  {
+               public void setTorProfile(int profile)  {
                
-                       if (profile == PROFILE_ON && currentStatus == 
STATUS_OFF)
+                       if (currentStatus == STATUS_OFF)
                {
                        
-                       currentStatus = STATUS_CONNECTING;
                    sendCallbackStatusMessage 
(getString(R.string.status_starting_up));
 
                    try
                             {
                                   initTor();
+
+                               currentStatus = STATUS_CONNECTING;
                             }
                             catch (Exception e)
                             {                          
@@ -1024,11 +1025,11 @@ public class TorService extends Service implements 
TorServiceConstants, TorConst
                }
                else
                {
-                       currentStatus = STATUS_OFF;
                    sendCallbackStatusMessage 
(getString(R.string.status_shutting_down));
                  
                    stopTor();
-                   
+
+                       currentStatus = STATUS_OFF;   
                }
                }
                



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to