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

[tor-commits] [orbot/master] set the VPN button properly for mini UI



commit 815bb83dbeaa411ae9e3c96f211de7d270c63a6a
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Tue Feb 4 13:24:29 2020 -0500

    set the VPN button properly for mini UI
---
 .../java/org/torproject/android/mini/MiniMainActivity.java    | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java b/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java
index 5be3d027..7ef51c52 100644
--- a/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java
+++ b/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java
@@ -173,8 +173,6 @@ public class MiniMainActivity extends AppCompatActivity
 
     private void stopTor() {
 
-//        requestTorStatus();
-
         Intent intent = new Intent(MiniMainActivity.this, OrbotService.class);
         stopService(intent);
 
@@ -467,7 +465,7 @@ public class MiniMainActivity extends AppCompatActivity
 
 	private void refreshVPNApps ()
     {
-        TorVpnService.start(this);
+        TorVpnService.stop(this);
         startActivity(new Intent(MiniMainActivity.this, VPNEnableActivity.class));
     }
 
@@ -714,14 +712,13 @@ public class MiniMainActivity extends AppCompatActivity
         sendIntentToService(TorServiceConstants.CMD_SIGNAL_HUP);
     }
 
+
     @Override
     protected void onResume() {
         super.onResume();
 
-//        mBtnBridges.setChecked(Prefs.bridgesEnabled());
-        mBtnVPN.setChecked(Prefs.useVpn());
-
-//        setCountrySpinner();
+        if (mBtnVPN.isChecked()!=Prefs.useVpn())
+            mBtnVPN.setChecked(Prefs.useVpn());
 
 		requestTorStatus();
 



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