Upside down preview after rotating from landscape to reverse landscape on Samsung Fold

51 views
Skip to first unread message

Matthew Mossman

unread,
Apr 18, 2023, 10:00:34 PM4/18/23
to Android CameraX Discussion Group
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:

- Install CameraXBasic example from here onto the above devices: https://github.com/android/camera-samples/tree/main/CameraXBasic
- 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 seeing the issue with our app (using cameraX 1.2.1) as well as the official samples located here: https://github.com/android/camera-samples/
- 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!

Scott Nien

unread,
Apr 19, 2023, 12:36:55 AM4/19/23
to Matthew Mossman, Android CameraX Discussion Group
Hi Matthew, 

Thanks for reporting the issue. Can you try CameraX 1.2.2. or 1.3.0-alpha05 ?  The issue should be fixed in the later version. 

Scott

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/048a8023-e9bb-4904-8633-4a29622f866bn%40android.com.

Matthew Mossman

unread,
Apr 19, 2023, 11:25:35 AM4/19/23
to Android CameraX Discussion Group, scot...@google.com, Android CameraX Discussion Group, Matthew Mossman
Hello - yes, the issue appears resolved with CameraX 1.3.0-alpha05.

And, now I see the issue tracker report for this bug...which I failed to find before posting this. 😅

Thanks!

Scott Nien

unread,
Apr 19, 2023, 11:23:33 PM4/19/23
to Matthew Mossman, Android CameraX Discussion Group
Glad that it worked!   
Reply all
Reply to author
Forward
0 new messages