From c6ecfb2f674c4fef6915fd4c6f7c830062047953 Mon Sep 17 00:00:00 2001 From: inorichi Date: Tue, 26 Jan 2016 19:18:31 +0100 Subject: [PATCH] Trying to fix some crashes --- .../eu/kanade/tachiyomi/data/download/DownloadManager.java | 3 +-- .../eu/kanade/tachiyomi/data/download/model/DownloadQueue.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java index da828f33ec..d0e7819230 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java @@ -8,7 +8,6 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; @@ -340,7 +339,7 @@ public class DownloadManager { Type collectionType = new TypeToken>() {}.getType(); pages = gson.fromJson(reader, collectionType); } - } catch (FileNotFoundException e) { + } catch (Exception e) { Timber.e(e.getCause(), e.getMessage()); } finally { if (reader != null) try { reader.close(); } catch (IOException e) { /* Do nothing */ } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.java b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.java index 00e2914750..6a332ddcc2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.java +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.java @@ -43,7 +43,7 @@ public class DownloadQueue extends ArrayList { } public Observable getStatusObservable() { - return statusSubject; + return statusSubject.onBackpressureBuffer(); } public Observable getProgressObservable() {