Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor onStartCommand method to use switch statement for action handling #281

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

Epic-R-R
Copy link
Contributor

Refactor onStartCommand method in OblivionVpnService for improved action handling.

This refactor replaces multiple if-else statements with a switch statement, enhancing readability and maintainability by centralizing Intent action dispatching for starting and stopping the VPN service (FLAG_VPN_START and FLAG_VPN_STOP).

Key Changes:

  • Simplified action handling logic using a switch statement.
  • Ensured compatibility with existing functionality.
  • Thoroughly tested for correct behavior with various Intent actions.

@markpash markpash merged commit f8b4ea1 into bepass-org:main Jun 15, 2024
@markpash
Copy link
Member

Thanks for the PR ❤️

@bepass-org bepass-org deleted a comment from hamedshahrasbi Aug 30, 2024
@bepass-org bepass-org deleted a comment from hamedshahrasbi Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants