Skip to content

Commit

Permalink
#176 Catch and wrap OutOfMemoryErrors thrown when decoding bitmaps so…
Browse files Browse the repository at this point in the history
… listeners can be called
  • Loading branch information
davemorrissey committed Apr 3, 2016
1 parent 3c96277 commit f664866
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,9 @@ protected Bitmap doInBackground(Void... params) {
} catch (Exception e) {
Log.e(TAG, "Failed to decode tile", e);
this.exception = e;
} catch (OutOfMemoryError e) {
Log.e(TAG, "Failed to decode tile - OutOfMemoryError", e);
this.exception = new RuntimeException(e);
}
return null;
}
Expand Down Expand Up @@ -1576,6 +1579,9 @@ protected Integer doInBackground(Void... params) {
} catch (Exception e) {
Log.e(TAG, "Failed to load bitmap", e);
this.exception = e;
} catch (OutOfMemoryError e) {
Log.e(TAG, "Failed to load bitmap - OutOfMemoryError", e);
this.exception = new RuntimeException(e);
}
return null;
}
Expand Down

0 comments on commit f664866

Please sign in to comment.