Always save crash file if onCreate() is not done
This commit is contained in:
1 parent
19403975ba
commit
ae2443fbf0
1 file changed
+6
-1
@@ -96,6 +96,8 @@ public class EhApplication extends RecordingApplication {
|
||||
|
||||
private final List<Activity> mActivityList = new ArrayList<>();
|
||||
|
||||
private boolean initialized = false;
|
||||
|
||||
public static EhApplication getInstance() {
|
||||
return instance;
|
||||
}
|
||||
@@ -108,7 +110,8 @@ public class EhApplication extends RecordingApplication {
|
||||
Thread.UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
|
||||
try {
|
||||
if (Settings.getSaveCrashLog()) {
|
||||
// Always save crash file if onCreate() is not done
|
||||
if (!initialized || Settings.getSaveCrashLog()) {
|
||||
Crash.saveCrashLog(instance, e);
|
||||
}
|
||||
} catch (Throwable ignored) { }
|
||||
@@ -184,6 +187,8 @@ public class EhApplication extends RecordingApplication {
|
||||
if (DEBUG_PRINT_NATIVE_MEMORY || DEBUG_PRINT_IMAGE_COUNT) {
|
||||
debugPrint();
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
private void clearTempDir() {
|
||||
|
||||
Reference in new issue
Block a user