Handle FTS exception

This commit is contained in:
M66B 2020-03-10 12:20:27 +01:00
parent 7973ab1214
commit 6ccb1e708f
1 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import androidx.work.Worker;
import androidx.work.WorkerParameters;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@ -85,7 +86,8 @@ public class WorkerFts extends Worker {
if (ids.size() > INDEX_BATCH_SIZE)
markIndexed(db, ids);
} catch (Throwable ex) {
if (ex instanceof OutOfMemoryError)
if (ex instanceof FileNotFoundException ||
ex instanceof OutOfMemoryError)
ids.add(id);
Log.e(ex);
}