OSDN Git Service

Remove FD optimization case for decodeStream
authorJohn Reck <jreck@google.com>
Mon, 9 Sep 2013 23:37:57 +0000 (16:37 -0700)
committerJohn Reck <jreck@google.com>
Mon, 9 Sep 2013 23:41:20 +0000 (23:41 +0000)
commit5835157d762a5b6bffe3d892c588ebc475bccb44
tree2540b1359dc480b22094e81544a4dd84fdd333ed
parent23ae1461d2cf0ac3f1da71200544381a8d8a4957
Remove FD optimization case for decodeStream

 Bug: 10677727
 The problem is that the FileInputStream may be wrapping a pipe or
 AssetFileDescriptor which fails if handed to decodeFileDescriptor.
 The problem is that AFDs can start in the middle of a file, whereas
 decodeFileDescriptor assumes it can mmap() the FD and start at
 the beginning.

Change-Id: I98a3c5f789865145e25a99b32d205e290808c1cf
graphics/java/android/graphics/BitmapFactory.java