Fix bug in JNI BitmapFactory
In nativeCreateLargeBitmapFromFileDescriptor() if the file descriptor can not be rewinded isShareable should be set to false. Change-Id: I7dd545c9d52d21c226e11b8921e35a1d9bba9515
This commit is contained in:
@@ -628,12 +628,6 @@ public class BitmapFactory {
|
||||
*/
|
||||
public static LargeBitmap createLargeBitmap(
|
||||
FileDescriptor fd, boolean isShareable) throws IOException {
|
||||
if (MemoryFile.isMemoryFile(fd)) {
|
||||
int mappedlength = MemoryFile.getSize(fd);
|
||||
MemoryFile file = new MemoryFile(fd, mappedlength, "r");
|
||||
InputStream is = file.getInputStream();
|
||||
return createLargeBitmap(is, isShareable);
|
||||
}
|
||||
return nativeCreateLargeBitmap(fd, isShareable);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user