[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] clean VPN proxy settings before startup



commit 9467d7db275fe575e5b230f7c3c6b1f026c364b4
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Wed Feb 4 12:36:42 2015 -0500

    clean VPN proxy settings before startup
---
 src/org/torproject/android/service/TorService.java |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 60f151c..a20a227 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -368,7 +368,8 @@ public class TorService extends Service implements TorServiceConstants, TorConst
                     
                     if (action!=null){
                         if(action.equals(Intent.ACTION_BOOT_COMPLETED)||action.equals(CMD_START)){
-                             setTorProfile(STATUS_ON);
+                            clearVpnProxy();
+                            setTorProfile(STATUS_ON);
                         }else if (action.equals(CMD_STOP)){
                             setTorProfile(STATUS_OFF);
                         }else if (action.equals(CMD_INIT)){
@@ -1440,8 +1441,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
         public void clearVpnProxy ()
         {
             SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
-            Editor ePrefs = prefs.edit();
-            
+            Editor ePrefs = prefs.edit();            
             ePrefs.remove("pref_proxy_type");
             ePrefs.remove("pref_proxy_host");
             ePrefs.remove("pref_proxy_port");



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