Trying to fix some crashes

This commit is contained in:
inorichi 2016-01-26 19:18:31 +01:00
parent 8ca0814aff
commit c6ecfb2f67
2 changed files with 2 additions and 3 deletions

View file

@ -8,7 +8,6 @@ import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonReader;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
@ -340,7 +339,7 @@ public class DownloadManager {
Type collectionType = new TypeToken<List<Page>>() {}.getType(); Type collectionType = new TypeToken<List<Page>>() {}.getType();
pages = gson.fromJson(reader, collectionType); pages = gson.fromJson(reader, collectionType);
} }
} catch (FileNotFoundException e) { } catch (Exception e) {
Timber.e(e.getCause(), e.getMessage()); Timber.e(e.getCause(), e.getMessage());
} finally { } finally {
if (reader != null) try { reader.close(); } catch (IOException e) { /* Do nothing */ } if (reader != null) try { reader.close(); } catch (IOException e) { /* Do nothing */ }

View file

@ -43,7 +43,7 @@ public class DownloadQueue extends ArrayList<Download> {
} }
public Observable<Download> getStatusObservable() { public Observable<Download> getStatusObservable() {
return statusSubject; return statusSubject.onBackpressureBuffer();
} }
public Observable<Download> getProgressObservable() { public Observable<Download> getProgressObservable() {