summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-05-09 01:27:57 +0200
committercyBerta <cyberta@riseup.net>2020-06-03 10:35:19 +0200
commit6af4af42f54d46190f2fb7f2a700f829a8f1a732 (patch)
tree070b4fafdbd6520a63ca972bd8d14b8b56d939b9 /app/src
parent2b265e3bd54b0e71e0560be6eea3f6450b794e37 (diff)
catch IllegalStateException when app is not in a state that allows to start the provider API service
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java b/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java
index 65d01b22..04a53a47 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderAPICommand.java
@@ -40,7 +40,11 @@ public class ProviderAPICommand {
private void execute() {
if (isInitialized()) {
Intent intent = setUpIntent();
- context.startService(intent);
+ try {
+ context.startService(intent);
+ } catch (IllegalStateException e) {
+ e.printStackTrace();
+ }
}
}