Catch OutOfMemoryError in SSIV tile decoder.

captchafix
Florens Douwes 11 years ago
parent 18f2c36e5c
commit e99c41c0c7
  1. 6
      Clover/app/src/main/java/com/davemorrissey/labs/subscaleview/SubsamplingScaleImageView.java

@ -1025,6 +1025,9 @@ public class SubsamplingScaleImageView extends View {
}
} catch (Exception e) {
Log.e(TAG, "Failed to initialise bitmap decoder", e);
} catch (OutOfMemoryError e) {
Log.e(TAG, "OOM in decode tile", e);
System.gc();
}
return null;
}
@ -1086,6 +1089,9 @@ public class SubsamplingScaleImageView extends View {
}
} catch (Exception e) {
Log.e(TAG, "Failed to decode tile", e);
} catch (OutOfMemoryError e) {
Log.e(TAG, "OOM in decode tile", e);
System.gc();
}
return null;
}

Loading…
Cancel
Save