summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorJoseph Wen <josephwen@google.com>2010-09-10 10:15:09 +0800
committerJoseph Wen <josephwen@google.com>2010-09-10 17:24:15 +0800
commit2dcfbefbbeac406d16ec379c6430dd9ee9fd23a1 (patch)
tree4bd1355023359455128a6f7e9aa1f28e98ed03e1 /graphics
parent6aec2250108b7db774643bbc088590138099adb6 (diff)
downloadframeworks_base-2dcfbefbbeac406d16ec379c6430dd9ee9fd23a1.zip
frameworks_base-2dcfbefbbeac406d16ec379c6430dd9ee9fd23a1.tar.gz
frameworks_base-2dcfbefbbeac406d16ec379c6430dd9ee9fd23a1.tar.bz2
Fix bug in JNI BitmapFactory
In nativeCreateLargeBitmapFromFileDescriptor() if the file descriptor can not be rewinded isShareable should be set to false. Change-Id: I7dd545c9d52d21c226e11b8921e35a1d9bba9515
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/BitmapFactory.java6
1 files changed, 0 insertions, 6 deletions
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index 02e16cd..6234f2c 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -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);
}