Image rotation detection from content:// uri handling fixed#2
Image rotation detection from content:// uri handling fixed#2pavelbazika wants to merge 1 commit into
Conversation
|
Hi @pavelbazika that's really great! Would you be able to provide an instrumentation test for that too? |
|
Hi, I can try it, but as I do Android development just for fun, I haven't used the Android testing framework yet. So I'll (finally) check how the tests are done on Android and let you know. But it will take some time... |
|
Hi, Moreover, my pull request is just a fix, not a new feature. So if some test already exists somewhere, I'm able to update it, but if you would like me to write a test from scratch, I cannot help with it unfortunately. |
When thumbnail creation is requested, but the original image URI does not have
file://butcontent://scheme, method neededRotation did not worked.getAbsolutePath()does not return valid path in such case andExifInterfacereturns orientation 0 (at least on Samsung S6).IMHO
ContentResolvershould be used to access the data. HoweverContentResolverprovidesInputStream, but nativeExifInterfacehas onlyFileaccepting constructor. Luckily theExifInterfacein support library accepts also a stream, so I used it.