diff options
author | cyBerta <cyberta@riseup.net> | 2022-08-09 13:06:43 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2022-08-09 13:06:43 +0200 |
commit | 7ab1d900e7f3bb185ba4d97f53f63f6f84611ec6 (patch) | |
tree | 9ada6fb9970ac7275e96f0c58646e93f329042f4 /app/src/main/java | |
parent | 49e755e3f9b2856558e1257887a8d7d0cd95b323 (diff) |
show stop blocking in error dialog if no more gateways of a given transport are available
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/fragments/MainActivityErrorDialog.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/MainActivityErrorDialog.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/MainActivityErrorDialog.java index 44998868..ae25c61c 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/MainActivityErrorDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/MainActivityErrorDialog.java @@ -45,6 +45,7 @@ import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.base.models.Provider; import se.leap.bitmaskclient.eip.EIP; import se.leap.bitmaskclient.eip.EipCommand; +import se.leap.bitmaskclient.eip.VoidVpnService; import se.leap.bitmaskclient.providersetup.ProviderAPICommand; /** @@ -128,7 +129,11 @@ public class MainActivityErrorDialog extends DialogFragment { builder.setNegativeButton(R.string.cancel, (dialog, id) -> {}); break; case NO_MORE_GATEWAYS: - builder.setNegativeButton(R.string.cancel, (dialog, id) -> {}); + builder.setNegativeButton(R.string.vpn_button_turn_off_blocking, (dialog, id) -> { + Intent stopVoidVpnIntent = new Intent (getContext(), VoidVpnService.class); + stopVoidVpnIntent.setAction(EIP_ACTION_STOP_BLOCKING_VPN); + getContext().startService(stopVoidVpnIntent); + }); if (getPreferredCity(applicationContext) != null) { builder.setPositiveButton(R.string.warning_option_try_best, (dialog, which) -> { new Thread(() -> { |