diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index eaeda7ff07..027184986d 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -28,15 +28,9 @@ import android.os.DeadSystemException; import android.os.RemoteException; import android.util.Log; -import java.io.BufferedOutputStream; -import java.io.BufferedReader; import java.io.File; -import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.util.Date; public class ApplicationEx extends Application { private Thread.UncaughtExceptionHandler prev = null; @@ -125,40 +119,7 @@ public class ApplicationEx extends Application { FileWriter out = null; try { out = new FileWriter(file); - out.write(new Date() + "\r\n"); - out.write(ex.toString() + "\r\n"); - out.write(Log.getStackTraceString(ex) + "\r\n"); - - out.write("\r\n"); - - Process proc = null; - BufferedReader br = null; - OutputStream os = null; - try { - os = new BufferedOutputStream(new FileOutputStream(file)); - - String[] cmd = new String[]{"logcat", - "-d", - "-v", "threadtime", - //"-t", "1000", - Helper.TAG + ":I"}; - proc = Runtime.getRuntime().exec(cmd); - br = new BufferedReader(new InputStreamReader(proc.getInputStream())); - - String line; - while ((line = br.readLine()) != null) - out.write(line + "\r\n"); - } catch (Throwable exex) { - out.write(exex.toString()); - } finally { - if (os != null) - os.close(); - if (br != null) - br.close(); - if (proc != null) - proc.destroy(); - } - + out.write(ex.toString() + "\n" + Log.getStackTraceString(ex)); } catch (IOException e) { Log.e(Helper.TAG, e + "\n" + Log.getStackTraceString(e)); } finally { diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index fcefca8e59..18a63d09e5 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -212,7 +212,7 @@ public class Helper { draft.folder = drafts.id; draft.msgid = EntityMessage.generateMessageId(); draft.to = new Address[]{Helper.myAddress()}; - draft.subject = context.getString(R.string.app_name) + " " + BuildConfig.VERSION_NAME + " unexpected error"; + draft.subject = context.getString(R.string.app_name) + " " + BuildConfig.VERSION_NAME + " crash log"; draft.content = true; draft.received = new Date().getTime(); draft.setContactInfo(context);