Hello!
We are seeing an interesting bug appear when using CameraX on the following devices:
- Samsung Galaxy Z Fold 2 5GÂ
- Samsung Galaxy Z Fold 3
The image preview appears to render upside down after rotating from landscape to reverse landscape (or from reverse landscape to landscape) quickly enough as to skip the portrait configuration.
In other words, if you rotate the device in one fluid motion from Surface.ROTATION_90 to Surface.ROTATION_270 the preview renders upside down after settling on the new orientation.
Reproduction steps:
- Load the CameraXBasic example
- Rotate the device to landscape - note the preview view renders normally
- Rotate the device quickly to reverse landscape - note the preview view renders upside down after briefly blinking away and reconfiguring itself
See demonstration videos (using CameraXBasic sample app):
Notes:
- We are not seeing the issue on Pixel devices or Samsung Galaxy S23 Ultra
I am unsure if I should post this issue here, on Google Issue Tracker bug reporting, or on the camera-samples GitHub issues area. Thanks!