Don't round size to page size. Ashmem will do this internally as needed.

This commit is contained in:
Marco Nelissen
2009-06-23 10:34:55 -07:00
parent 3bf657a22b
commit 7bcbd51173
3 changed files with 10 additions and 13 deletions

View File

@@ -532,7 +532,7 @@ public class BitmapFactory {
public static Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, Options opts) {
try {
if (MemoryFile.isMemoryFile(fd)) {
int mappedlength = MemoryFile.getMappedSize(fd);
int mappedlength = MemoryFile.getSize(fd);
MemoryFile file = new MemoryFile(fd, mappedlength, "r");
InputStream is = file.getInputStream();
Bitmap bm = decodeStream(is, outPadding, opts);