mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
9324bee13c
commit
7cf97eeaf9
|
@ -147,9 +147,13 @@ public class WorkerFts extends Worker {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cancel(Context context) {
|
static void cancel(Context context) {
|
||||||
|
try {
|
||||||
Log.i("Cancelling " + getName());
|
Log.i("Cancelling " + getName());
|
||||||
WorkManager.getInstance(context).cancelUniqueWork(getName());
|
WorkManager.getInstance(context).cancelUniqueWork(getName());
|
||||||
Log.i("Cancelled " + getName());
|
Log.i("Cancelled " + getName());
|
||||||
|
} catch (IllegalStateException ex) {
|
||||||
|
Log.w(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getName() {
|
private static String getName() {
|
||||||
|
|
Loading…
Reference in New Issue