mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Unescape newlines when showing log.
This commit is contained in:
@@ -190,7 +190,6 @@ public class DevReportActivity extends BaseCrashReportDialog
|
|||||||
MenuInflater inflater = getDelegate().getMenuInflater();
|
MenuInflater inflater = getDelegate().getMenuInflater();
|
||||||
inflater.inflate(R.menu.dev_report_actions, menu);
|
inflater.inflate(R.menu.dev_report_actions, menu);
|
||||||
sendReport = menu.findItem(R.id.action_send_report);
|
sendReport = menu.findItem(R.id.action_send_report);
|
||||||
|
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,27 +282,27 @@ public class DevReportActivity extends BaseCrashReportDialog
|
|||||||
if (crashData != null) {
|
if (crashData != null) {
|
||||||
for (Entry<ReportField, String> e : crashData.entrySet()) {
|
for (Entry<ReportField, String> e : crashData.entrySet()) {
|
||||||
ReportField field = e.getKey();
|
ReportField field = e.getKey();
|
||||||
|
String value = e.getValue().replaceAll("\\\\n", "\n");
|
||||||
boolean required = requiredFields.contains(field);
|
boolean required = requiredFields.contains(field);
|
||||||
boolean excluded = excludedFields.contains(field);
|
boolean excluded = excludedFields.contains(field);
|
||||||
View v = inflater.inflate(R.layout.list_item_crash,
|
View v = inflater.inflate(R.layout.list_item_crash,
|
||||||
report, false);
|
report, false);
|
||||||
CheckBox cb = v
|
CheckBox cb = v.findViewById(R.id.include_in_report);
|
||||||
.findViewById(R.id.include_in_report);
|
|
||||||
cb.setTag(field);
|
cb.setTag(field);
|
||||||
cb.setChecked(required || !excluded);
|
cb.setChecked(required || !excluded);
|
||||||
cb.setEnabled(!required);
|
cb.setEnabled(!required);
|
||||||
cb.setOnCheckedChangeListener(DevReportActivity.this);
|
cb.setOnCheckedChangeListener(DevReportActivity.this);
|
||||||
((TextView) v.findViewById(R.id.title))
|
TextView title = v.findViewById(R.id.title);
|
||||||
.setText(e.getKey().toString());
|
title.setText(field.toString());
|
||||||
((TextView) v.findViewById(R.id.content))
|
TextView content = v.findViewById(R.id.content);
|
||||||
.setText(e.getValue());
|
content.setText(value);
|
||||||
report.addView(v);
|
report.addView(v);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
View v = inflater.inflate(
|
View v = inflater.inflate(
|
||||||
android.R.layout.simple_list_item_1, report, false);
|
android.R.layout.simple_list_item_1, report, false);
|
||||||
((TextView) v.findViewById(android.R.id.text1))
|
TextView error = v.findViewById(android.R.id.text1);
|
||||||
.setText(R.string.could_not_load_report_data);
|
error.setText(R.string.could_not_load_report_data);
|
||||||
report.addView(v);
|
report.addView(v);
|
||||||
}
|
}
|
||||||
report.setVisibility(VISIBLE);
|
report.setVisibility(VISIBLE);
|
||||||
|
|||||||
Reference in New Issue
Block a user