summaryrefslogtreecommitdiff
path: root/app
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
parent6af4af42f54d46190f2fb7f2a700f829a8f1a732 (diff)
catch rare IllegalStateExceptions when enqueueing jobs
Diffstat (limited to 'app')
-rw-r--r--app/src/main/AndroidManifest.xml11
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java6
2 files changed, 8 insertions, 9 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 83394209..c2ae2cb3 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -51,7 +51,9 @@
</service>
<service
android:name=".ProviderAPI"
- android:enabled="true" />
+ android:exported="false"
+ android:permission="android.permission.BIND_JOB_SERVICE">
+ </service>
<receiver
android:name=".OnBootReceiver"
@@ -111,13 +113,6 @@
android:name=".eip.EIP"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE">
- <intent-filter>
- <action android:name="se.leap.bitmaskclient.EIP.UPDATE"/>
- <action android:name="se.leap.bitmaskclient.EIP.START"/>
- <action android:name="se.leap.bitmaskclient.EIP.STOP"/>
- <action android:name="se.leap.bitmaskclient.START_ALWAYS_ON_EIP"/>
- <action android:name="se.leap.bitmaskclient.EIP.IS_RUNNING"/>
- </intent-filter>
</service>
</application>
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