summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java11
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java2
2 files changed, 9 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java
index 65810861..335d70b2 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java
@@ -175,10 +175,15 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB
}
@Override
- public void stopTorService() throws IllegalStateException {
+ public void stopTorService() {
closeTorServiceConnection();
- Intent stopIntent = new Intent(this, TorService.class);
- stopService(stopIntent);
+ try {
+ Intent stopIntent = new Intent(this, TorService.class);
+ stopService(stopIntent);
+ } catch (IllegalStateException e) {
+ e.printStackTrace();
+ }
+
}
@Override
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java
index c385c4c4..0853f96d 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java
@@ -150,7 +150,7 @@ public abstract class ProviderApiManagerBase {
public interface ProviderApiServiceCallback {
void broadcastEvent(Intent intent);
void startTorService() throws InterruptedException, IllegalStateException;
- void stopTorService() throws IllegalStateException;
+ void stopTorService();
int getTorHttpTunnelPort();
boolean isConnectedToWifi();
}