I have a problem on Android 8 and Android 9 and I would appreciate it if you could help me. When I capture a photo on nitrogen6x and nitrogen8m Boundary Devices boards with the camera in Android 8 or 9, The size of the image is always 8.39 MB regardless of what the photo is. This is not the case for Android 7 o before. This is caused because in the "Image_getJpegSize" function in ./frameworks/base/media/jni/android_media_Utils.cpp, "blob->jpeg_size" is 0 and causes the size to be 8.39MB. I think the problem is with the following commit in "./vendor/nxp-opensource/imx/" (url = https://source.codeaurora.org/external/imx/android-imx/platform/hardware/imx):
Author: Wnbo.Zhu <firstname.lastname@example.org>
This is a very old commit. When I try to revert it, There are two many conflicts. And also it uses the jhead.h which no longer exists after android 7 and starting from android 8.
So my question is what should I do to make the photo sizes variable like android 7?
You can also find the logcats for taking the photo and for showing the details of the photo attached.
Thanks a lot for your help.