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

[tor-commits] [orbot/master] leave VPN toggle enabled, just stop the service



commit b2b92d6b55f20890d28a52fed51a759ae4371ef1
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Sat May 30 06:29:43 2020 -0400

    leave VPN toggle enabled, just stop the service
---
 app/src/main/java/org/torproject/android/OrbotMainActivity.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index 61e4b4f2..328476a9 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -210,10 +210,12 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan
     }
 
     private void stopTor() {
-        if (mBtnVPN.isChecked()) mBtnVPN.setChecked(false); // indirectly closes tun2socks interface
+        if (mBtnVPN.isChecked()) sendIntentToService(ACTION_STOP_VPN);
+
         Intent intent = new Intent(OrbotMainActivity.this, OrbotService.class);
         stopService(intent);
 
+
     }
 
     /**



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