summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/bitmap/DecodeTask.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/bitmap/DecodeTask.java b/src/com/android/bitmap/DecodeTask.java
index 0d814c4..03b8445 100644
--- a/src/com/android/bitmap/DecodeTask.java
+++ b/src/com/android/bitmap/DecodeTask.java
@@ -348,6 +348,16 @@ public class DecodeTask extends AsyncTask<Void, Void, ReusableBitmap> {
decodeResult = bitmap;
} catch (IOException e) {
// fall through to below and try again with the non-cropping decoder
+ if (fd == null) {
+ in = reset(in);
+ if (in == null) {
+ return null;
+ }
+ if (isCancelled()) {
+ return null;
+ }
+ }
+
e.printStackTrace();
} finally {
Trace.endSection();