UX for error case based on another VPN app running as always-on
In case another VPN app is running and configured to have always-on permissions, attempting to start tor-vpn will fail.
There's no Android API to test if another VPN app is running other than trying to start the VPN and receiving an error response to the attempt to request the VPN permission.
Additionally there's a hook (onRevoke()
) in Androids VpnService that gets called if the Android system revoked tor-vpn's permission. It's most likely that another VPN app was started while tor-vpn wasn't set to always-on, but it could also be caused by a user revoking the VPN permission in the Android settings, and there's no way to distinguish these cases. That's why an error message for that second case could also be vague enough.