mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 17:11:12 +01:00
Allow reporting unexpected errors
This commit is contained in:
@@ -23,7 +23,6 @@ import android.app.Application;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.DeadSystemException;
|
||||
import android.os.RemoteException;
|
||||
@@ -47,7 +46,7 @@ public class ApplicationEx extends Application {
|
||||
public void uncaughtException(Thread thread, Throwable ex) {
|
||||
if (ownFault(ex)) {
|
||||
Log.e(Helper.TAG, ex + "\r\n" + Log.getStackTraceString(ex));
|
||||
writeCrashLog(ApplicationEx.this, ex);
|
||||
writeCrashLog(ex);
|
||||
|
||||
if (prev != null)
|
||||
prev.uncaughtException(thread, ex);
|
||||
@@ -113,8 +112,8 @@ public class ApplicationEx extends Application {
|
||||
return false;
|
||||
}
|
||||
|
||||
static void writeCrashLog(Context context, Throwable ex) {
|
||||
File file = new File(context.getCacheDir(), "crash.log");
|
||||
private void writeCrashLog(Throwable ex) {
|
||||
File file = new File(getCacheDir(), "crash.log");
|
||||
Log.w(Helper.TAG, "Writing exception to " + file);
|
||||
|
||||
FileWriter out = null;
|
||||
|
||||
Reference in New Issue
Block a user