From 93abe065a29c43d398efd83de212297a218e1f7d Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sat, 14 Jun 2014 14:10:43 -0400 Subject: [PATCH] Fix a NetworkOnMainThreadException --- .../activities/downloader/manager/BookDownloadThread.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MinimalBible/src/main/java/org/bspeice/minimalbible/activities/downloader/manager/BookDownloadThread.java b/MinimalBible/src/main/java/org/bspeice/minimalbible/activities/downloader/manager/BookDownloadThread.java index 409bd50..70335e6 100644 --- a/MinimalBible/src/main/java/org/bspeice/minimalbible/activities/downloader/manager/BookDownloadThread.java +++ b/MinimalBible/src/main/java/org/bspeice/minimalbible/activities/downloader/manager/BookDownloadThread.java @@ -9,6 +9,8 @@ import org.crosswire.jsword.book.install.Installer; import javax.inject.Inject; +import rx.schedulers.Schedulers; + /** * Thread that handles downloading a book */ @@ -31,6 +33,7 @@ public class BookDownloadThread { // First, look up where the Book came from refreshManager.installerFromBook(b) + .subscribeOn(Schedulers.io()) .subscribe((installer) -> { try { installer.install(b);