mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Address issues found in code review
This commit is contained in:
@@ -14,6 +14,7 @@ import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
@@ -74,7 +75,7 @@ public class DevReportActivity extends BaseCrashReportDialog
|
||||
private EditText userCommentView = null;
|
||||
private EditText userEmailView = null;
|
||||
private CheckBox includeDebugReport = null;
|
||||
private View chevron = null;
|
||||
private Button chevron = null;
|
||||
private LinearLayout report = null;
|
||||
private View progress = null;
|
||||
private MenuItem sendReport = null;
|
||||
@@ -113,9 +114,8 @@ public class DevReportActivity extends BaseCrashReportDialog
|
||||
final View requestReport = findViewById(R.id.request_report);
|
||||
userCommentView = (EditText) findViewById(R.id.user_comment);
|
||||
userEmailView = (EditText) findViewById(R.id.user_email);
|
||||
TextView debugReport = (TextView) findViewById(R.id.debug_report);
|
||||
includeDebugReport = (CheckBox) findViewById(R.id.include_debug_report);
|
||||
chevron = findViewById(R.id.chevron);
|
||||
chevron = (Button) findViewById(R.id.chevron);
|
||||
report = (LinearLayout) findViewById(R.id.report_content);
|
||||
progress = findViewById(R.id.progress_wheel);
|
||||
|
||||
@@ -126,8 +126,12 @@ public class DevReportActivity extends BaseCrashReportDialog
|
||||
userCommentView.setHint(isFeedback() ? R.string.enter_feedback :
|
||||
R.string.describe_crash);
|
||||
|
||||
debugReport.setVisibility(isFeedback() ? GONE : VISIBLE);
|
||||
includeDebugReport.setVisibility(isFeedback() ? VISIBLE : GONE);
|
||||
if (isFeedback()) {
|
||||
includeDebugReport
|
||||
.setText(getString(R.string.include_debug_report_feedback));
|
||||
} else {
|
||||
includeDebugReport.setChecked(true);
|
||||
}
|
||||
|
||||
findViewById(R.id.acceptButton).setOnClickListener(
|
||||
new View.OnClickListener() {
|
||||
@@ -151,11 +155,15 @@ public class DevReportActivity extends BaseCrashReportDialog
|
||||
chevron.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
chevron.setSelected(!chevron.isSelected());
|
||||
if (chevron.isSelected())
|
||||
boolean show =
|
||||
chevron.getText().equals(getString(R.string.show));
|
||||
if (show) {
|
||||
chevron.setText(R.string.hide);
|
||||
refresh();
|
||||
else
|
||||
} else {
|
||||
chevron.setText(R.string.show);
|
||||
report.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -367,7 +375,7 @@ public class DevReportActivity extends BaseCrashReportDialog
|
||||
fields.add(field.name());
|
||||
}
|
||||
prefEditor.putStringSet(PREF_EXCLUDED_FIELDS, fields);
|
||||
prefEditor.commit();
|
||||
prefEditor.apply();
|
||||
}
|
||||
|
||||
if (success) {
|
||||
|
||||
Reference in New Issue
Block a user