Loading Android.mk +2 −0 Original line number Diff line number Diff line ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) Loading Loading @@ -63,3 +64,4 @@ ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),) include $(call all-makefiles-under, $(LOCAL_PATH)) endif endif gallerycommon/src/com/android/gallery3d/exif/CountedDataInputStream.java 100644 → 100755 +6 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,12 @@ public class CountedDataInputStream extends FilterInputStream { return readShort() & 0xffff; } public byte readByte() throws IOException { readOrThrow(mByteArray, 0 ,1); mByteBuffer.rewind(); return mByteBuffer.get(0); } public int readInt() throws IOException { readOrThrow(mByteArray, 0 , 4); mByteBuffer.rewind(); Loading gallerycommon/src/com/android/gallery3d/exif/ExifParser.java +19 −14 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ class ExifParser { protected static final int OFFSET_SIZE = 2; private static final Charset US_ASCII = Charset.forName("US-ASCII"); private static final byte APP1_UP = (byte)0xFF; private static final byte APP1_DOWN = (byte)0xE1; protected static final int DEFAULT_IFD0_OFFSET = 8; Loading Loading @@ -784,15 +786,16 @@ class ExifParser { } marker = dataStream.readShort(); } } else{ dataStream.skip(6); if (dataStream.readInt() == HEIC_HEADER) { while(true){ try{ short marker = dataStream.readShort(); if (marker == JpegHeader.APP1) { byte marker = dataStream.readByte(); if(marker == APP1_UP){ dataStream.mark(8); marker = dataStream.readByte(); if (marker == APP1_DOWN){ int header = 0; short headerTail = 0; int length = dataStream.readUnsignedShort(); Loading @@ -805,6 +808,8 @@ class ExifParser { return true; } } dataStream.reset(); } }catch (Exception e){ break; } Loading Loading
Android.mk +2 −0 Original line number Diff line number Diff line ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) Loading Loading @@ -63,3 +64,4 @@ ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),) include $(call all-makefiles-under, $(LOCAL_PATH)) endif endif
gallerycommon/src/com/android/gallery3d/exif/CountedDataInputStream.java 100644 → 100755 +6 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,12 @@ public class CountedDataInputStream extends FilterInputStream { return readShort() & 0xffff; } public byte readByte() throws IOException { readOrThrow(mByteArray, 0 ,1); mByteBuffer.rewind(); return mByteBuffer.get(0); } public int readInt() throws IOException { readOrThrow(mByteArray, 0 , 4); mByteBuffer.rewind(); Loading
gallerycommon/src/com/android/gallery3d/exif/ExifParser.java +19 −14 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ class ExifParser { protected static final int OFFSET_SIZE = 2; private static final Charset US_ASCII = Charset.forName("US-ASCII"); private static final byte APP1_UP = (byte)0xFF; private static final byte APP1_DOWN = (byte)0xE1; protected static final int DEFAULT_IFD0_OFFSET = 8; Loading Loading @@ -784,15 +786,16 @@ class ExifParser { } marker = dataStream.readShort(); } } else{ dataStream.skip(6); if (dataStream.readInt() == HEIC_HEADER) { while(true){ try{ short marker = dataStream.readShort(); if (marker == JpegHeader.APP1) { byte marker = dataStream.readByte(); if(marker == APP1_UP){ dataStream.mark(8); marker = dataStream.readByte(); if (marker == APP1_DOWN){ int header = 0; short headerTail = 0; int length = dataStream.readUnsignedShort(); Loading @@ -805,6 +808,8 @@ class ExifParser { return true; } } dataStream.reset(); } }catch (Exception e){ break; } Loading