Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36bafb0b authored by Brad Fitzpatrick's avatar Brad Fitzpatrick Committed by Android Git Automerger
Browse files

am 0ddcc8bc: am b618b2ef: am f0dbf00d: Merge "Handle OutOfMemoryError when...

am 0ddcc8bc: am b618b2ef: am f0dbf00d: Merge "Handle OutOfMemoryError when decoding images in ThumbnailUtils"

* commit '0ddcc8bc':
  Handle OutOfMemoryError when decoding images in ThumbnailUtils
parents b9d173ce 0ddcc8bc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public class ThumbnailUtils {
     *
     * @param filePath the path of image file
     * @param kind could be MINI_KIND or MICRO_KIND
     * @return Bitmap
     * @return Bitmap, or null on failures
     *
     * @hide This method is only used by media framework and media provider internally.
     */
@@ -123,6 +123,8 @@ public class ThumbnailUtils {
                bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options);
            } catch (IOException ex) {
                Log.e(TAG, "", ex);
            } catch (OutOfMemoryError oom) {
                Log.e(TAG, "Unable to decode file " + filePath + ". OutOfMemoryError.", oom);
            }
        }