gather crash information more aggressively

especially for crashes while device is locked
might help with #801
This commit is contained in:
Helium314 2025-05-31 20:30:18 +02:00
parent e4e99a7e5d
commit 3fcea486be
4 changed files with 21 additions and 13 deletions

View file

@ -52,10 +52,18 @@ public final class JniUtils {
.getMethod("currentApplication").invoke(null, (Object[]) null);
} catch (Exception ignored) { }
}
if (app != null) // use the actual path if possible
if (app != null && app.getFilesDir() != null) // use the actual path if possible
filesDir = app.getFilesDir().getAbsolutePath();
final File userSuppliedLibrary = new File(filesDir + File.separator + JNI_LIB_IMPORT_FILE_NAME);
if (!BuildConfig.BUILD_TYPE.equals("nouserlib") && userSuppliedLibrary.exists()) {
File userSuppliedLibrary;
try {
userSuppliedLibrary = new File(filesDir + File.separator + JNI_LIB_IMPORT_FILE_NAME);
if (!userSuppliedLibrary.isFile())
userSuppliedLibrary = null;
} catch (Exception e) {
userSuppliedLibrary = null;
}
if (!BuildConfig.BUILD_TYPE.equals("nouserlib") && userSuppliedLibrary != null) {
String wantedChecksum = expectedDefaultChecksum();
try {
if (app != null) {