diff options
Diffstat (limited to 'graphics/java/android')
-rw-r--r-- | graphics/java/android/graphics/Bitmap.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 6d60dd2..3c24683 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -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; } |