mirror of https://github.com/M66B/FairEmail.git
Added debug info source
This commit is contained in:
parent
3f61350477
commit
cd150dfe41
|
@ -479,7 +479,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
new SimpleTask<Long>() {
|
||||
@Override
|
||||
protected Long onExecute(Context context, Bundle args) throws IOException, JSONException {
|
||||
return Log.getDebugInfo(context, R.string.title_debug_info_remark, null, null).id;
|
||||
return Log.getDebugInfo(context, "setup", R.string.title_debug_info_remark, null, null).id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1481,7 +1481,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
sb.append(line).append("\r\n");
|
||||
}
|
||||
|
||||
return Log.getDebugInfo(context, R.string.title_crash_info_remark, null, sb.toString()).id;
|
||||
return Log.getDebugInfo(context, "crash", R.string.title_crash_info_remark, null, sb.toString()).id;
|
||||
} finally {
|
||||
file.delete();
|
||||
}
|
||||
|
@ -2210,7 +2210,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
|
||||
@Override
|
||||
protected Long onExecute(Context context, Bundle args) throws IOException, JSONException {
|
||||
return Log.getDebugInfo(context, R.string.title_debug_info_remark, null, null).id;
|
||||
return Log.getDebugInfo(context, "main", R.string.title_debug_info_remark, null, null).id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1780,7 +1780,7 @@ public class Log {
|
|||
}
|
||||
}
|
||||
|
||||
static EntityMessage getDebugInfo(Context context, int title, Throwable ex, String log) throws IOException, JSONException {
|
||||
static EntityMessage getDebugInfo(Context context, String source, int title, Throwable ex, String log) throws IOException, JSONException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(context.getString(title)).append("\n\n\n\n");
|
||||
sb.append(getAppInfo(context));
|
||||
|
@ -1813,7 +1813,8 @@ public class Log {
|
|||
draft.thread = draft.msgid;
|
||||
draft.to = new Address[]{myAddress()};
|
||||
draft.subject = context.getString(R.string.app_name) + " " +
|
||||
BuildConfig.VERSION_NAME + BuildConfig.REVISION + " debug info";
|
||||
BuildConfig.VERSION_NAME + BuildConfig.REVISION +
|
||||
" debug info - " + source;
|
||||
draft.received = new Date().getTime();
|
||||
draft.seen = true;
|
||||
draft.ui_seen = true;
|
||||
|
@ -1935,7 +1936,7 @@ public class Log {
|
|||
new SimpleTask<Long>() {
|
||||
@Override
|
||||
protected Long onExecute(Context context, Bundle args) throws Throwable {
|
||||
return Log.getDebugInfo(context, R.string.title_unexpected_info_remark, ex, null).id;
|
||||
return Log.getDebugInfo(context, "report", R.string.title_unexpected_info_remark, ex, null).id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue