Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Anti-censorship
Pluggable Transports
Snowflake Mobile
Commits
1a47d2c1
Commit
1a47d2c1
authored
Nov 11, 2020
by
HashikD
Browse files
Add startProxy method in MainFragment
parent
ea1a9fbe
Changes
1
Show whitespace changes
Inline
Side-by-side
app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
View file @
1a47d2c1
...
...
@@ -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.
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment