mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
Don't crash when pressing SHOW with user information when sending feedback
This commit is contained in:
@@ -51,15 +51,15 @@ class ReportData {
|
|||||||
final boolean isOptional;
|
final boolean isOptional;
|
||||||
boolean isIncluded = true;
|
boolean isIncluded = true;
|
||||||
|
|
||||||
ReportItem(String name, int nameRes, ReportInfo info) {
|
ReportItem(String name, @StringRes int nameRes, ReportInfo info) {
|
||||||
this(name, nameRes, info, true);
|
this(name, nameRes, info, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportItem(String name, int nameRes, String info) {
|
ReportItem(String name, @StringRes int nameRes, String info) {
|
||||||
this(name, nameRes, new SingleReportInfo(info), true);
|
this(name, nameRes, new SingleReportInfo(info), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportItem(String name, int nameRes, ReportInfo info,
|
ReportItem(String name, @StringRes int nameRes, ReportInfo info,
|
||||||
boolean isOptional) {
|
boolean isOptional) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.nameRes = nameRes;
|
this.nameRes = nameRes;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.briarproject.briar.android.logging.BriefLogFormatter;
|
|||||||
import org.briarproject.briar.android.logging.CachingLogHandler;
|
import org.briarproject.briar.android.logging.CachingLogHandler;
|
||||||
import org.briarproject.briar.android.logging.LogDecrypter;
|
import org.briarproject.briar.android.logging.LogDecrypter;
|
||||||
import org.briarproject.briar.android.reporting.ReportData.MultiReportInfo;
|
import org.briarproject.briar.android.reporting.ReportData.MultiReportInfo;
|
||||||
|
import org.briarproject.briar.android.reporting.ReportData.ReportItem;
|
||||||
import org.briarproject.briar.android.viewmodel.LiveEvent;
|
import org.briarproject.briar.android.viewmodel.LiveEvent;
|
||||||
import org.briarproject.briar.android.viewmodel.MutableLiveEvent;
|
import org.briarproject.briar.android.viewmodel.MutableLiveEvent;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
@@ -156,7 +157,8 @@ class ReportViewModel extends AndroidViewModel {
|
|||||||
MultiReportInfo userInfo = new MultiReportInfo();
|
MultiReportInfo userInfo = new MultiReportInfo();
|
||||||
if (!isNullOrEmpty(comment)) userInfo.add("Comment", comment);
|
if (!isNullOrEmpty(comment)) userInfo.add("Comment", comment);
|
||||||
if (!isNullOrEmpty(email)) userInfo.add("Email", email);
|
if (!isNullOrEmpty(email)) userInfo.add("Email", email);
|
||||||
data.add(new ReportData.ReportItem("UserInfo", 0, userInfo, false));
|
data.add(new ReportItem("UserInfo", R.string.dev_report_user_info,
|
||||||
|
userInfo, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check the state of the TorPlugin, if this is feedback
|
// check the state of the TorPlugin, if this is feedback
|
||||||
|
|||||||
@@ -573,6 +573,7 @@
|
|||||||
<string name="optional_contact_email">Your email address (optional)</string>
|
<string name="optional_contact_email">Your email address (optional)</string>
|
||||||
<string name="include_debug_report_crash">Include anonymous data about the crash</string>
|
<string name="include_debug_report_crash">Include anonymous data about the crash</string>
|
||||||
<string name="include_debug_report_feedback">Include anonymous data about this device</string>
|
<string name="include_debug_report_feedback">Include anonymous data about this device</string>
|
||||||
|
<string name="dev_report_user_info">User information</string>
|
||||||
<string name="dev_report_basic_info">Basic information</string>
|
<string name="dev_report_basic_info">Basic information</string>
|
||||||
<string name="dev_report_device_info">Device information</string>
|
<string name="dev_report_device_info">Device information</string>
|
||||||
<string name="dev_report_stacktrace">Stacktrace</string>
|
<string name="dev_report_stacktrace">Stacktrace</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user