From c6ae44acadb8c124633c09c0e74f93b72595ec12 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 10 Dec 2021 17:31:17 +0100 Subject: catch potential IllegalArgumentException when enqueuing intents for EIP and ProviderAPI Service --- app/src/main/java/se/leap/bitmaskclient/eip/EIP.java | 2 +- app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src') 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 4db8f0c2..cf4dc9bf 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java @@ -136,7 +136,7 @@ public final class EIP extends JobIntentService implements Observer { static void enqueueWork(Context context, Intent work) { try { enqueueWork(context, EIP.class, JOB_ID, work); - } catch (IllegalStateException e) { + } catch (IllegalStateException | IllegalArgumentException e) { e.printStackTrace(); } } 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 709ca651..022ad040 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java @@ -117,7 +117,7 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB static void enqueueWork(Context context, Intent work) { try { ProviderAPI.enqueueWork(context, ProviderAPI.class, JOB_ID, work); - } catch (IllegalStateException e) { + } catch (IllegalStateException | IllegalArgumentException e) { e.printStackTrace(); } } -- cgit v1.2.3