[tor-commits] [orbot/master] leave VPN toggle enabled, just stop the service
n8fr8 at torproject.org
n8fr8 at torproject.org
Mon Aug 24 21:02:51 UTC 2020
commit b2b92d6b55f20890d28a52fed51a759ae4371ef1
Author: n8fr8 <nathan at guardianproject.info>
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);
+
}
/**
More information about the tor-commits
mailing list