[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake-mobile/master] Add startProxy method in MainFragment
commit 1a47d2c1e0a6c04e46cdd97fec3c94df0a7482b1
Author: Hashik Donthineni <HashikDonthineni@xxxxxxxxx>
Date: Wed Nov 11 13:13:55 2020 +0530
Add startProxy method in MainFragment
---
.../java/org/torproject/snowflake/fragments/MainFragment.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java b/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
index efcddc1..25b0ba2 100644
--- a/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
+++ b/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
@@ -79,8 +79,7 @@ public class MainFragment extends Fragment {
setSnowflakeStatus(false);
callback.serviceToggle(ForegroundServiceConstants.ACTION_STOP);
} else {
- setSnowflakeStatus(true);
- callback.serviceToggle(ForegroundServiceConstants.ACTION_START);
+ startProxy();
}
});
showServed(callback.getServed());
@@ -105,6 +104,14 @@ public class MainFragment extends Fragment {
}
}
+ /**
+ * Starts the proxy.
+ */
+ public void startProxy() {
+ setSnowflakeStatus(true);
+ callback.serviceToggle(ForegroundServiceConstants.ACTION_START);
+ }
+
/**
* Used to update the UI elements with corresponding status of the Snowflake.
*
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits