Camera exposure
- [x ] I have searched open and closed issues for duplicates
- [ x] I am submitting a bug report for existing functionality that does not work as intended
- [ x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [ x] This isn't a feature request or a discussion topic
Bug description
In the two last versions of Signal the camera does not adjust the exposure correctly, many times i need to use the smartphone camera.
Screenshots
Camera App
Camera of Signal

Device info
Device: Asus Zenfone 4 max Android version: 8.1 Signal version: 4.44.7
Link to debug log
Same. Device: Moto G3 Android version: 6.0 Signal version: 4.44.7
I looked around at this, and I think it might be related to dark previews with some cameras using the Camera2 API. The answers suggest explicitly setting CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE to be the widest range (ie largest difference upper - lower) returned by characteristics.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES). (Also see this link.)
With the recent Signal switch to the CameraX api, it seems this file is the natural place for the changes.
Some digging into the CameraX api (and source) leads me to think that the way to do it is to initialize mImageCaptureConfigBuilder (ditto the preview config) with setDefaultCaptureConfig, and that the CaptureConfig passed to that should be created with setImplementationOptions which finally is created by a process like this one.
I haven't written any code for Android (nor spent much time in Java intricacies) so I'm a little worried about whether @RestrictTo(Scope.LIBRARY_GROUP) would prevent one from using setDefaultCaptureConfig? In any case I hope someone might be willing to take a closer look at this. This all seems pretty daunting to me but to someone who has just spent a lot of time digging into the CameraX api maybe it all looks a bit simpler.
Same issue with me. I just wonder how come it was working fine earlier but after updating App it broke this function.
Device: Xiaomi Redmi Note4 Android version: 7.0 Signal version: 4.47.5
We'll track exposure problems here: #9108