Fixed
Status Update
Comments
ji...@google.com <ji...@google.com>
am...@google.com <am...@google.com> #2
We use build flavours heavily with a lot of common code. The refactoring support in AS is really good but it continually catches us out when it doesn't work across all flavours in a project. It's a big gap for serious product development.
ji...@google.com <ji...@google.com> #3
We at my company need this same feature. We have a lot of white labels and need refactor the same class across flavours. :(
ji...@google.com <ji...@google.com> #4
I need this feature too...
Description
Version used: 25.1.0
Theme used: n/a
Devices/Android versions reproduced on: all
The new ExifInterface implementation determines the file type of a file before it reads / writes changes. This is the relevant code:
private int getMimeType(BufferedInputStream in) throws IOException {
in.mark(SIGNATURE_CHECK_SIZE);
byte[] signatureCheckBytes = new byte[SIGNATURE_CHECK_SIZE];
if (in.read(signatureCheckBytes) != SIGNATURE_CHECK_SIZE) {
throw new EOFException();
}
...
}
Note here how the exact number of read bytes are checked - SIGNATURE_CHECK_SIZE is set to 5000. Now, if I have a smaller JPEG file - for example 100x200 monotone colored (guess what, I created that for a Unit test!) - this file will not be accepted neither for reading nor writing EXIF information.
On the contrary, the old platform implementation has no such restriction, but is of course considered unsafe.