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

Commit a2801c5f authored by Chris Craik's avatar Chris Craik Committed by Android Git Automerger
Browse files

am 4899398d: am baba771c: am 47742d4b: Merge "Fix NPE with inPurgeable Bitmaps...

am 4899398d: am baba771c: am 47742d4b: Merge "Fix NPE with inPurgeable Bitmaps in getAllocationByteCount" into klp-dev

* commit '4899398d':
  Fix NPE with inPurgeable Bitmaps in getAllocationByteCount
parents 9cd3b121 4899398d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1167,6 +1167,11 @@ public final class Bitmap implements Parcelable {
     * @see #reconfigure(int, int, Config)
     */
    public final int getAllocationByteCount() {
        if (mBuffer == null) {
            // native backed bitmaps don't support reconfiguration,
            // so alloc size is always content size
            return getByteCount();
        }
        return mBuffer.length;
    }