GrapheneOS / Camera

Modern camera app focused on privacy and security with QR & barcode scanning.
https://grapheneos.org/
MIT License
826 stars 87 forks source link

Changing screen orientation in gallery resets current image to first one #370

Open mb720 opened 1 year ago

mb720 commented 1 year ago

Hi and thanks a lot for GrapheneOS!

When I'm in the image gallery and rotate the screen, e.g. from portrait to landscape, the gallery resets to show the first image in the gallery.

Then I have to swipe left to get back to the image I wanted to see.

I'm using a Pixel 6 Pro.

The camera app is:

version 63 app.grapheneos.camera versionCode 63 targetSdk 33 minSdk 29

I tried working around this by changing the gallery app to some different app, but according to the discussion in this feature request, that's not possible.

empratyush commented 10 months ago

When I'm in the image gallery and rotate the screen, e.g. from portrait to landscape, the gallery resets to show the first image in the gallery.

Unable to reproduce this. Is this about built-in gallery app in GrapheneOs?

mb720 commented 10 months ago

The bug still happens on my device.

Is this about built-in gallery app in GrapheneOs?

Yes, the one that opens when you click here inside the camera app:

Camera app screenshot

The camera app is:

version 63
app.grapheneos.camera
versionCode 63
targetSdk 33
minSdk 29
tsxv478 commented 5 months ago

Can confirm that this happens when swiping between full screen images in both grid and filmstrip views, except with grid view it's not the first image in the gallery, but rather the one you last opened. To reproduce: open any image from the grid view, swipe to another one without exiting full screen view and then rotate the screen.

mb720 commented 5 months ago

I'm not sure if this was fixed in version 66, which I'm using now, but the issue doesn't occur at the moment. Thanks for fixing this!

Edit: I just tried again rotating the screen and the camera app's gallery showed the first image again. I have no idea what happened in between those tries that made the bug reappear. I have attached logcat.gz that contains the output of adb logcat while I:

  1. opened the camera
  2. started the gallery via the round button on the right side (see previous screenshot with red arrow)
  3. swiped to another image
  4. rotated the phone
  5. got moved back to the first image

@tsxv478: Note that the issue I referred to happened in the camera app's gallery, not the app named "Gallery" that supports filmstrip view and grid view.