Crash when trying to read or write files outside the app dir
Some custom ROMs and OEM skins break basic Android functionality. This should be caught and either have a fallback or at least display a message about what's going on instead of crashing.
Seems to mainly affect old Xiaomi (again) phones.
Searching for "action.OPEN_DOCUMENT ActivityNotFoundException" gives plenty of examples of where people have had to make workarounds for this, but most of them seem to either need EXTERNAL_STORAGE permission (which I don't want to add), or only work for reading files, so not usable for e.g. exporting the Tox save or saving incoming file transfers.
I / ActivityManager (3698): START u0 {act = android.intent.action.OPEN_DOCUMENT cat = [android.intent.category.OPENABLE] typ = * / *} from uid 10052
I / ChatViewModel (7144): Setting active chat D6800334
D / AndroidRuntime (7144): Shutting down VM
E / AndroidRuntime (5927): FATAL EXCEPTION: main
E / AndroidRuntime (5927): Process: ltd.evilcorp.atox, PID: 5927
E / AndroidRuntime (5927): android.content. ActivityNotFoundException: No Activity found to handle Intent {act = android.intent.action.OPEN_DOCUMENT cat = [android.intent.category.OPENABLE] typ = * / *}
E / AndroidRuntime (5927): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:2007)
E / AndroidRuntime (5927): at android.app.Instrumentation.exe
cStartActivity (Instrumentation.java:1673)
E / AndroidRuntime (5927): at android.app.Activity.startActivityForResult (Activity.java:4586)
E / AndroidRuntime (5927) : at imbestartActivityForResult (Unknown Source: 10)
E / AndroidRuntime (5927): at imbe $ ak (: 4)
E / AndroidRuntime (5927): at androidx.fragment.app.Fragment.x0 (: 1)
E / AndroidRuntime (5927 ): at ltd.evilcorp.atox.ui.chat.ChatFragment $ a.onClick (java-style lambda group: 1)
E / AndroidRuntime (5927): at android.view.View.performClick (View.java:6597)
E / AndroidRuntime (5927): at android.view.View.performClickInternal (View.java:6574)
E / AndroidRuntime (5927): at android.view.View.access $ 3100 (View.java:778)
E / AndroidRuntime (5927): at android.view.View $ PerformClick.run (View.java:25885)
E / AndroidRuntime (5927): at android.os.Handler.handleCallback (Handler.java:873)
E / AndroidRuntime (5927): at android.os.Handler.dispatchMessage (Handler.java:99)
E / AndroidRuntime (5927): at android .os.Looper.loop (Looper.java:193)
E / AndroidRuntime (5927): at android.app.ActivityThread.main (ActivityThread.java:6669)
E / AndroidRuntime (5927): at java.lang.reflect.Method .invoke (Native Method)
E / AndroidRuntime (5927): at com.android.internal.os.RuntimeInit $ MethodAndArgsCaller.run (RuntimeInit.java:493)
E / AndroidRuntime (5927): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)
W / ActivityManager (3698): Force finishing activity ltd.evilcorp.atox / .MainActivity
Edit: The basic Android functionality broken is the storage access framework which aTox uses to access files outside the app dir. The reason I'm not going to stop using it is that it allows aTox to do this without any storage access permissions. aTox literally can't read/write files that the user hasn't selected in an OPEN_DOCUMENT or similar request.