Commit 1a47d2c1 authored by HashikD's avatar HashikD
Browse files

Add startProxy method in MainFragment

parent ea1a9fbe
...@@ -79,8 +79,7 @@ public class MainFragment extends Fragment { ...@@ -79,8 +79,7 @@ public class MainFragment extends Fragment {
setSnowflakeStatus(false); setSnowflakeStatus(false);
callback.serviceToggle(ForegroundServiceConstants.ACTION_STOP); callback.serviceToggle(ForegroundServiceConstants.ACTION_STOP);
} else { } else {
setSnowflakeStatus(true); startProxy();
callback.serviceToggle(ForegroundServiceConstants.ACTION_START);
} }
}); });
showServed(callback.getServed()); showServed(callback.getServed());
...@@ -105,6 +104,14 @@ public class MainFragment extends Fragment { ...@@ -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. * Used to update the UI elements with corresponding status of the Snowflake.
* *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment