Catch OOM on ROOM compute call

This commit is contained in:
M66B
2020-11-05 12:56:12 +01:00
parent 18d2428f8e
commit 1459e89ea5
2 changed files with 2 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ class RoomTrackingLiveData<T> extends LiveData<T> {
try {
value = mComputeFunction.call();
done = true;
} catch (Exception e) {
} catch (Throwable e) {
if (++retry > 10)
throw new RuntimeException(
"Exception while computing database live data.", e);