Gallery app has storage scopes enabled and has no other permissions. I took a few screenshots, then I try to open them from the file system. The app shows blank dark grey screen and doesn't open the screenshot. After a while sends crash report. Sometimes, it works.

Mainly want to improve the software/see if this could be a security issue. Not a bid deal for me.

Here are the logs.

type: ANR
osVersion: google/bluejay/bluejay:14/UQ1A.231205.015/2023121200:user/release-keys
package: com.android.gallery3d:40030
process: com.android.gallery3d

activity: com.android.gallery3d/.app.GalleryActivity
cause: ANR Input dispatching timed out (a81dd63 com.android.gallery3d/com.android.gallery3d.app.GalleryActivity (server) is not responding. Waited 5000ms for FocusEvent(hasFocus=false)).
info: ANR in com.android.gallery3d (com.android.gallery3d/.app.GalleryActivity)
PID: 11544
Reason: Input dispatching timed out (a81dd63 com.android.gallery3d/com.android.gallery3d.app.GalleryActivity (server) is not responding. Waited 5000ms for FocusEvent(hasFocus=false)).
Parent: com.android.gallery3d/.app.GalleryActivity
ErrorId: 8e14475e-68f1-4f8e-9fd9-25215208bc03
Frozen: false
Load: 0.0 / 0.0 / 0.0
----- Output from /proc/pressure/memory -----
some avg10=0.00 avg60=0.00 avg300=0.00 total=1359563
full avg10=0.00 avg60=0.00 avg300=0.00 total=658845
----- End output from /proc/pressure/memory -----
----- Output from /proc/pressure/cpu -----
some avg10=4.51 avg60=5.19 avg300=5.28 total=116131550
----- End output from /proc/pressure/cpu -----
----- Output from /proc/pressure/io -----
some avg10=0.02 avg60=0.03 avg300=0.00 total=2704429
full avg10=0.02 avg60=0.03 avg300=0.00 total=1774949
----- End output from /proc/pressure/io -----

CPU usage from 105055ms to -3ms ago (2023-12-28 13:43:26.992 to 2023-12-28 13:45:12.050):
  20% 612/surfaceflinger: 13% user + 7.7% kernel / faults: 2306 minor 7 major
  17% 1334/system_server: 11% user + 6.2% kernel / faults: 99458 minor 492 major
  8.2% 2484/com.android.launcher3: 5.5% user + 2.6% kernel / faults: 9406 minor 220 major
  0.3% 3154/com.android.permissioncontroller: 0.2% user + 0.1% kernel / faults: 32350 minor 4386 major
  4.6% 1972/com.android.systemui: 3.1% user + 1.5% kernel / faults: 9411 minor 38 major
  4.4% 620/android.hardware.graphics.composer@2.4-service: 2.7% user + 1.6% kernel / faults: 13 minor
  4.2% 3324/ch.protonvpn.android: 2.3% user + 1.8% kernel / faults: 119 minor
  3.4% 1745/irq/442-fts: 0% user + 3.4% kernel
  1.9% 351/decon0_kthread: 0% user + 1.9% kernel
  1.4% 199/spi11: 0% user + 1.4% kernel
13% TOTAL: 6.7% user + 5.3% kernel + 0% iowait + 0.7% irq + 0.2% softirq
CPU usage from 1985631ms to 1985631ms ago (1969-12-31 19:00:00.000 to 1969-12-31 19:00:00.000) with 0% awake:
0% TOTAL: 0% user + 0% kernel
```

    Zzgooloo have you added the folder in storage scopes for screenshots to the Gallery app?

    You can do that by going to the app's settings > storage scopes > add folder

      other8026

      Mm I may have an incomplete understanding of storage scopes. Didn't know I had to explicitly ass permissions to the file in this case.

      However this doesn't explain why it sometimes works.