summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-06-10 23:22:38 +0200
committercyBerta <cyberta@riseup.net>2020-06-10 23:22:38 +0200
commitd4c0f2d288aed4ec49a0eaa1e369a98bf34cc1dc (patch)
tree91e47c0c9a265486fff2bc6fe89d193249c4616e /app/src/main/java/se
parent6af4af42f54d46190f2fb7f2a700f829a8f1a732 (diff)
catch rare IllegalStateExceptions when enqueueing jobs
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
index 511a33bc..34c88ef9 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
@@ -123,7 +123,11 @@ public final class EIP extends JobIntentService implements Observer {
* Convenience method for enqueuing work in to this service.
*/
static void enqueueWork(Context context, Intent work) {
- enqueueWork(context, EIP.class, JOB_ID, work);
+ try {
+ enqueueWork(context, EIP.class, JOB_ID, work);
+ } catch (IllegalStateException e) {
+ e.printStackTrace();
+ }
}
@Override