Use AHardwareBuffer_getAllocationSize Test: android.graphics.cts.BitmapTest#testGetAllocationSizeWrappedBuffer Bug: 280338223 Change-Id: I3baf204e59988c11a58a06fcb90a5e14525492e9