crashes when plugging in USB-OTG on Android 10 and 11

  • Device OS and version: Lineage 17 / OS 10
  • Device model/manufacturer: OnePlus 5T
  • F-Droid version (in the About screen): 1.10
  • F-Droid privileged extension version (if installed): none

What did you do? (clear steps if possible)

Pressed the USB OTG button (while having a USB OTG recognized drive plugged in)

What did you expect to see?

USB OTF repo added/available in FDroid

What did you see instead?

Crash.

11-09 13:42:57.383  1358  1383 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{b6940a0 u0 org.fdroid.fdroid/.views.main.MainActivity t-1 f}
11-09 13:42:57.613 29714 30416 D DownloadManager: [904] Finished with status SUCCESS
11-09 13:42:57.629  2214  2214 D ImageWallpaper: wallpaper visibility changes to: false
11-09 13:42:57.697 18921 18965 D StrictMode: StrictMode policy violation: android.os.strictmode.DiskReadViolation
11-09 13:42:57.697 18921 18965 D StrictMode: 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1556)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at libcore.io.BlockGuardOs.stat(BlockGuardOs.java:387)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at libcore.io.ForwardingOs.stat(ForwardingOs.java:222)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at android.app.ActivityThread$AndroidOs.stat(ActivityThread.java:7269)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at java.io.UnixFileSystem.getLength(UnixFileSystem.java:298)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at java.io.File.length(File.java:970)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at fch.a(Unknown Source:25)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at bgng.e(Unknown Source:2)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at bgnh.run(PG:9)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at bbma.run(PG:1)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at bbkk.run(Unknown Source:38)
11-09 13:42:57.697 18921 18965 D StrictMode: 	at java.lang.Thread.run(Thread.java:919)
Edited by Hans-Christoph Steiner