diff options
author | cyBerta <cyberta@riseup.net> | 2021-07-14 23:53:26 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-07-21 22:02:28 +0200 |
commit | 3d9e76779f102b5cbbb29a2215415ab1a7f96aed (patch) | |
tree | 97ab91d12d19262ca86765c985c420b9c953ae6d /app/src/main/java/se/leap/bitmaskclient/eip | |
parent | d0c9fcab6b4c1fcfcd3022f9153dc6a117e58967 (diff) |
stop torService immediately instead of queueing it in provider api service
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java index f42a7d3d..1a2d8769 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java @@ -73,7 +73,6 @@ import static se.leap.bitmaskclient.providersetup.ProviderAPI.INCORRECTLY_DOWNLO import static se.leap.bitmaskclient.providersetup.ProviderAPI.INCORRECTLY_DOWNLOADED_VPN_CERTIFICATE; import static se.leap.bitmaskclient.providersetup.ProviderAPI.INCORRECTLY_UPDATED_INVALID_VPN_CERTIFICATE; import static se.leap.bitmaskclient.providersetup.ProviderAPI.PROVIDER_NOK; -import static se.leap.bitmaskclient.providersetup.ProviderAPI.STOP_PROXY; import static se.leap.bitmaskclient.tor.TorStatusObservable.TorStatus.OFF; /** @@ -211,7 +210,8 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta case INCORRECTLY_DOWNLOADED_EIP_SERVICE: case INCORRECTLY_DOWNLOADED_VPN_CERTIFICATE: if (TorStatusObservable.getStatus() != OFF) { - ProviderAPICommand.execute(context.getApplicationContext(), STOP_PROXY, null); + Intent stopIntent = new Intent(context, TorService.class); + context.stopService(stopIntent); } default: break; @@ -360,7 +360,8 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta observedProfileFromVpnStatus = null; this.changingGateway.set(changingGateway); if (TorStatusObservable.getStatus() != OFF) { - ProviderAPICommand.execute(context.getApplicationContext(), STOP_PROXY, null); + Intent intent = new Intent(context, TorService.class); + context.stopService(intent); } } |